I am absolutely new to Sun MQWith that in mind, I must ask the following question: Are you using a durable or a non-durable subscription to consume messages from the topic? If you're using Session.createConsumer or TopicSession.createSubscriber() then you're using a non-durable subscription, and this must be set up BEFORE you send the message to the topic, or else the message will be thrown away.
Thanks a ton for your reply.I am using non durable subscription.It might sound like a stupid question but do I have to set up a consumer before sending any messages to a topic?Yes, that is correct. This is explained in any textbook on JMS. It's also explained in the JMS tutorial
Where can I find documentation or any information about this.I was following the developer's guide for Sun MQ 4.4.Thanks again for your reply.It's mentioned in this section of that document: