-
Delay and process JMS messages? (3 messages)
- Posted by: Michael Medin
- Posted on: October 05 2006 04:10 EDT
I want to do a "delay and collect operation" on a JMS queue and wonder if anyone has any ideas on what would be the best way to accomplish this... The idea is that A sender sends a lot of "the same" messages and I want to collect them and sort through all "doubles" and only act on "one". The messages are sent out of order? For instance The sender send in order: Msg A, id=1, Msg B id=2, Msg A id=3, Msg A id=1, ... Then I want to delay the messages for "a while" (a few minutes) and then "see" that "Msg A id=1" has been sent twice during this time period and only "act" on the latest instance. The beans are "read" from a EJB context as message beans in a JBoss environment (but other application server might be used). // MickeMThreaded Messages (3)
- Re: Delay and process JMS messages? by Krishna Pothula on October 05 2006 13:09 EDT
- Re: Delay and process JMS messages? by Michael Medin on October 06 2006 02:51 EDT
- Re: Delay and process JMS messages? by arijit dey on October 09 2006 03:53 EDT
- Re: Delay and process JMS messages? by Michael Medin on October 06 2006 02:51 EDT
-
Re: Delay and process JMS messages?[ Go to top ]
- Posted by: Krishna Pothula
- Posted on: October 05 2006 13:09 EDT
- in response to Michael Medin
One way to implement your requirement is by pooling the messages in a local pool and then a seperate thread that checks this pool every x minutes to remove duplicate messages and start processing messages. -
Re: Delay and process JMS messages?[ Go to top ]
- Posted by: Michael Medin
- Posted on: October 06 2006 02:51 EDT
- in response to Krishna Pothula
Yes, but is that a practical solution inside the application server? I can see this as an option for a stand-alone server that does message processing but not using MDB? // MickeM -
Re: Delay and process JMS messages?[ Go to top ]
- Posted by: arijit dey
- Posted on: October 09 2006 03:53 EDT
- in response to Michael Medin
Message delivery to asynch recievers cannot be manupulated, MDBS will recieve the messages through a message broker which sits on the JMS server, so delay in that is not configurable. cheers, http://www.javaicillusion.blogspot.com/