aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Redelivery problem in JMS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Redelivery problem in JMS" Watch "Redelivery problem in JMS" New topic
Author

Redelivery problem in JMS

Attila Barbocz
Greenhorn

Joined: Apr 22, 2003
Posts: 3
Hello,
Here is my problem:
I use Java Message Service 1.0.2 Reference Implementation.
I have container managed MDB. If application cannot process message in
onMessage method it calls setRollBackOnly() method to return message
to MQ. But container imidiatly calls again onMessage() method and
deliver that message. As application is still unable to process that
message (waiting for some event to happend) it returns message back to
MQ.
Questions are:
1. How can I force the redelivery of a rolled back JMS message to
happen in a few minutes instead of immediately?
2. What happens with message when max number of attempts exides? How
can I get that message after that? It seems to me as if they
disappear.
3. Is it possible to set the redelivery delay time or error
destinations in JMS 1.0.2 Reference Implementation or in Sun ONE
Message Queue Version 3.0?
Thanks for any help
Kiran Bandi
Greenhorn

Joined: Mar 04, 2003
Posts: 21
Originally posted by Attila Barbocz:
Hello,
Here is my problem:
I use Java Message Service 1.0.2 Reference Implementation.
I have container managed MDB. If application cannot process message in
onMessage method it calls setRollBackOnly() method to return message
to MQ. But container imidiatly calls again onMessage() method and
deliver that message. As application is still unable to process that
message (waiting for some event to happend) it returns message back to
MQ.
Questions are:
1. How can I force the redelivery of a rolled back JMS message to
happen in a few minutes instead of immediately?
2. What happens with message when max number of attempts exides? How
can I get that message after that? It seems to me as if they
disappear.
3. Is it possible to set the redelivery delay time or error
destinations in JMS 1.0.2 Reference Implementation or in Sun ONE
Message Queue Version 3.0?
Thanks for any help


If you want to do it...DO IT!!<br />You can't cross a sea by staring at it!
Kiran Bandi
Greenhorn

Joined: Mar 04, 2003
Posts: 21
Originally posted by prasanth reddy:
[QB][/QB]


Sorry my previous posting was a mistake ...
When you rollback are you rolling back to same queue/topic ?
Looks like you are doing exactly that. Create another topic/queue and send the rolled back message to that topic/queue.
when you send it to the same topic it come back instantly to onMessage().
I dont understand what you are going to do by sending the message to the source system you can as well log the failed message to a log file and look in to it later .
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
The answer to your questions are entirely dependent on the JMS implementation.
Most JMS implementations allow you to configure a delay period between redelivery, however I am not sure if this feature is part of the reference implementation. I would venture that it is not.
Likewise, a max resend count can typically be configured in JMS implementations. After the resend count is reached the message can be configured to go to a "dead letter" queue in most implementations. Again, it is unlikely that the reference implementation addresses this.
For questions on the Sun One JMS implementation, I suggest you post to the Sun[tm] ONE Application Server Forum.
[ April 22, 2003: Message edited by: Chris Mathews ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Redelivery problem in JMS