[openamq-dev] amq_server message limit

Pieter Hintjens ph at imatix.com
Thu May 15 20:31:04 CEST 2008


On Thu, May 15, 2008 at 7:27 PM, Dmitri Tsyganov
<dmitri.tsyganov at dowjones.com> wrote:

>  It looks like the code that publishes messages to the queue is synchronized
> with the code that sends messages out to the network, and messages are
> accumulated before they are published. That's why queue message limit does
> not work in this case. But this is just a theory at this point.

In fact the problem is IMO the lack of internal synchronization.  We
did at one time use this but it created serious slow downs.

Note that OpenAMQ is built out of async objects, agents, which
communicate via method queues.  What happens here, I'm guessing, is
that the queue agent offloads its data into the server agent, another
async object in the server, as fast as it can, and that object
processes outgoing messages slower than it gets them in its method
queue.

So the queue limits are not applying, and the queue will generally be
empty.  In fact the queue limits will only apply if there are no
consumers, or if message acking is being used (which we do not
implement, but perhaps could).

In fact I recall facing this exact issue some time ago (2-3 years)
with a slow client (and there is an option in the WireAPI to simulate
a broken slow client precisely for this reason).  We made internal
synchronization, then some time later decided it was the wrong design,
took it out.

There are several solutions, but in any case strict synchronization is
not an option since it'll cut performance too much.

Mato, does this ring a bell?

-Pieter


More information about the openamq-dev mailing list