JMS Message Shows up in Test Client but not in program
If you are new to Message Queues and JMS, you might be wondering what happened to the message that showed up on the test client. Why it does not show in the program. Read on for some common mistakes committed that can cause this behavior.
If you are new to Message Queues and JMS, you might be wondering what happened to the message that showed up on the test client. Why it does not show in the program. Below are some common issues that cause this behavior:
- You set up a receiver through your jms test client.
Whenever you set up a receiver you are telling the test client to retrieve the message and delete it from the queue.
Please beware of this.
Close your test client and your code will receive the message.
- Some Jms test clients have the option of acknowledging and deleting messages from the MQ even if you did not set up a receiver. You are better of closing the test client before testing your code.
- If you don't have a jms test client browsing the queue and yet the code cannot retrieve the message, then make sure that someone else is not connected to the queue or some other program is not listening to the queue stealing your messages.
- If none of the above reasons apply, then check for coding or configuration issues.