0

I have a working code where in I can specify options while listening to queue messages. However, code uses IBM MQ classes and I want to achieve the same functionality using JMS classes. Is there any way I can specify the options ( more of filters) while listening to queue messages using JMS listener. Attaching the sample code used while listening to queue messages using IBM MQ classes.

MQGetMessageOptions gmo = new MQGetMessageOptions ( ) ; 
gmo.options = MQC.MQGMO_NO_WAIT + MQC.MQGMO_FAIL_IF_QUIESCING; 
serverFileQueue.get(mqMessage,gmo);

  • What type of filters? MessagId? – JoshMc Nov 15 '22 at 14:19
  • I am consuming messages in chunks. So there is a way to provide options such as receive chunks in logical order, wait till all the chunks are available etc in ibm mq code. I want to specify same options while using jms listener. – Chaitnya Joshi Nov 16 '22 at 15:52
  • There is no direct way to get the auto segmentation your are looking for in JMS. This answer may help you do it a different way: https://stackoverflow.com/questions/46242936/how-to-implement-logical-ordering-in-ibm-mq-in-java/46245234?r=SearchResults&s=7%7C12.7123#46245234 – JoshMc Nov 16 '22 at 22:34

0 Answers0