• Post Reply Bookmark Topic Watch Topic
  • New Topic

JMS rollback to Dead Letter  RSS feed

 
Mahesh Trikannad
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to rollback a JMS transaction, causing the JMS provider to move the message to another queue ( Like a dead letter queue or something ).

We have a application, which reads of JMS and does some database transactions, all as part of one XA transaction..
If we find the message has some problems, we want to rollback the database,
But we don�t want the rollback off JMS to have us read the message again.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mahesh,

Read this article, it is very informative and will probably answer to many of your questions regarding JMS transacted sessions and message redelivery.
Regards.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry ... Here there is the link:
http://www.javaworld.com/javaworld/jw-03-2002/jw-0315-jms_p.html
Regards.
 
Mahesh Trikannad
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Valentin,

Unfortunately I cannot get to that site.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can�t either, but I could yesterday. You can try little bit later, because it�s definately worth it. Their site might encounter some temporarily problems though.
 
Mahesh Trikannad
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Valentin,

It is indeed a good article.

I have a Question though

It mentions that if a JMS transaction is rolled back and if the number of retries is exceeded, The message may be lost , send to a exception handler OR send to another queue.

How, is this controlled.

Since I want a reliable system, I certainly do NOT want to lose a message, under any circumstances.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

It looks like a configuration setting and it probably depends upon the type of JMS provider you�re using. Currently we�re using Weblogic and its JMS capabilities but I don�t know from the top of my head how to do this. However if you intend to do the same, let me know because I might talk to one of our engineers, or I can look in some of the bea�s books in order to find the answer.
Regards.
 
Mahesh Trikannad
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are using Jonas, with MQ.

Do you know what the default behaviour is, after the mumber of retries are exceeded.

Regards

Mahesh
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I don't.
Regards.
 
adap proster
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any solution found on this. I am interested to know how was this solved
 
Henry Wong
author
Sheriff
Posts: 23282
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
adap proster wrote:any solution found on this. I am interested to know how was this solved


First, this topic is 11 years old. It is likely that the OP is no longer posting on the ranch...

As for the question, it looks like the topic is pretty much completed its discussions.... meaning transactions and redelivery to a dead letter queue are separately configured features.

For example, if you configure the messaging environment to not allow any redeliveries to consumers, but instead redeliver to the dead letter queue, then when the transaction is rolled back, it should go to the dead letter queue.... however, since these are different features, then any alternative failure, such as the consumer timing out with the message will also send the message to the dead letter queue.

And finally, the last posts of the topic (before you added to it) discusses the default configurations -- not sure why though. Unfortunately, the OP wanted it for "MQ", and there are lots of messaging environments with MQ in the name, such as ActiveMQ, IBM MQ, ZeroMQ, etc., so, it was unclear which environment was being requested.

Henry
 
Henry Wong
author
Sheriff
Posts: 23282
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
adap proster,
Your post was moved to a new topic as it is a completely different question ...
(This informational message will self destruct in two days)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!