Hi guys,
I was wondering if I read a message from a message Queue, and want to put it back can I do it?
I am using a JMS Queue inside
JBoss 3.0. Inside a session bean, I am sending messages to this queue. In my frontend I am reading the messages and using them. But if at a previous action the usecase terminated earlier than expected, not all the messages inside the queue were processed so there were some left inside the queue. The next time the usecase is runned, the frontend will process these leftout messages too but I don't want that. Now, I've written a message consumer which is called at the beginning of the usecase, and this consumer pops out all the messages inside the queue. But this messages are different for different users/machines/browsers. Inside each message I have a sessionID. Now, the consumer pops out all the messages, but I want it to pop out only the messages for a certain user. Here is my question:
1)Can I read the contents of a message without poping out the message?
or
2)If I pop out the message to read it's contents and I see that it's a message for another user and not the one currently running the usecase, I have to put the message back into the queue. Can I do that and how?
Thanks guys
Wish you well