activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <>
Subject Re: One message processing at a time
Date Thu, 18 Mar 2010 20:09:29 GMT
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 <> 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:
> Sent from the ActiveMQ - Dev mailing list archive at


Open Source Integration

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message