-
1. Re: Conditional Routing?
davsclaus Dec 4, 2008 2:20 PM (in response to james.kavanagh)Hi
1)
What do you want to happen with the JMS message when the bean can not process it? Should it
- commit
- rollback (put back on queue)
For rollback you need to use transacted JMS, and then it should happend automatically if your bean just throws an exception if it can not process the message.
However if you want the JMS message to commit then you need to deal what should happen.
2)
How does you bean determine it can not process the message?
- thrown an exception
- or some other condition? like a method that returns a boolean?
3)
What should happen with the message if #2 can not process the message? Should it just be forgotten? Or routed to another JMS queue or other store?
4)
Are you looking for to pause/start the JMS consumer depending on some conditions? If so then it requires a bit manual Java code to start and stop consumers on-the-fly.