either block the thread that gets the onMessage() call, ie: don't spawn threads, or use consumer.receive(timeout) to block a calling thread and let it process a message at a time.
On 18 March 2010 01:11, andythompson <[email protected]> wrote: > > Hi there, > > I have the following goal. > > I have one process that puts say 3 messages onto a queue. > I then have a MessageListener with onmessage detecting these messages and > firing an action. > What happens is the listener monitors the queue, sees three messages on it, > then takes all three messages of the queue and spawns a thread for each and > fires the action at the same time. > > What I want is that the listener takes a message of the queue, does > something, and then goes and gets the next message and so on. So it blocks > until its finished processing the message and processes them one by one. > > Ive spent some time on google and the forums but if someone could point me > in the right direction id appreciate it. > > Andy > -- > View this message in context: > http://old.nabble.com/One-message-processing-at-a-time-tp27940610p27940610.html > Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. > > -- http://blog.garytully.com Open Source Integration http://fusesource.com
