2
votes

I have N tombcat servers listening to a Tibco EMS queue. I have to send N messages each must be treated by a specific server (message 1 must be treated by tomcat server 1, ..., message N must be treated by server N)

As messages will be received by a random machine, I need to refuse message N on server N-1 for example , and return it to queue, until it is treated by server N..

What I've done, I throw an exception on message handler when receiving a message destinated to another queue, but I don't know really if message will be returned to queue , and will be forwarded to other instances?

Is there a time / number of retry limit on Tibco EMS when not acknowledging a message?

1

1 Answers

2
votes

First : have you considered using either : A - One queue per server ? OR B - A system based on message selector ? (name of destination server N is written by the sender in a JMS property "DestName", and each Tomcat server subscribes to the same queue, but with a message selector "DestName=MyTomcatID").

If none of the above is possible, then keep in mind that JMS transactions MUST be used, if you want an uncommitted message to rollback to the queue... and that the next server reading is random... NOT CYCLIC.