3

I am very NEW in JMS and I am having a hard time to read message from a remote MQ. I can send message to it easily, but I want to receive the message with a selector. Anyone has snips of code that could share? Thanks

Edit: I need to use Selectors and Listeners

Edit2:Specifically I am using IBM MQ. I am now sending messages through correlation ID, but I want to do it through message selectors. Is there a quick way to do it? Or I should write from scratch the JMS? Also I don't know where to modify the host name or port or queue name to connect to using JMS as standalone application.

JoshMc
  • 10,239
  • 2
  • 19
  • 38
  • This [thread](http://stackoverflow.com/questions/12236519/browse-read-and-remove-a-message-from-a-queue-using-ibm-mq-classes) seems to be interesting and similar to your question/problem. – mattias Nov 05 '14 at 16:58
  • Though the above thread will show you - it isn't a JMS sample. Can you expand on what difficulty are you having? Selectors are specified when you create a consumer. IS this IBM MQ or Active MQ - there are samples supplied with most proviers. Also review the Oralce JMS tutorial http://docs.oracle.com/javaee/7/tutorial/doc/jms-concepts.htm – Calanais Nov 05 '14 at 22:12
  • Please provide the additional clarifications as @Calanais requested above. Although you cannot create a new answer or comment on other people's stuff until you get more reputation, that isn't the right way to update a question anyway. It *is* possible to edit your own questions to add more information. In particular, *which* MQ are you using? The syntax to specify selectors is part of the JMS specification but the behavior varies a bit across products. If there are no updates to the question, it will eventually be closed as abandoned. – T.Rob Dec 04 '14 at 14:05
  • Specifically I am using IBM MQ. I am now sending messages through correlation ID, but I want to do it through message selectors. Is there a quick way to do it? Or I should write from scratch the JMS? Also I don't know where to modify the host name or port or queue name to connect to using JMS as standalone application. – Steve Torres Jan 28 '15 at 16:50

0 Answers0