[openamq-dev] queue_bind, size and consume/cancel

Dmitri Tsyganov dmitri.tsyganov at dowjones.com
Fri Nov 9 17:55:53 CET 2007


Hello Martin,

Thanks for your response!

I can probably change the order of bind and consume.

As for the potential bug - I think there is one, probably the minor
one. 

Looks like when I set "trim" size limit, the "kill" limit is still there
and it is set to 50K or so. So when I set trim limit to 70K, without
specifying "kill" size - my queue gets killed when it reaches the size
of 50K. If I set "warn", "trim" and "kill" (although kill is kinda
redundant here :) ) - everything works - queue gets trimmed at my "trim"
limit! 

Sincerely,

Dmitri


On Thu, 2007-11-08 at 07:42 +0100, Martin Sustrik wrote:
> Hi Dmitri,
> 
> > On consuming side, I have an application that declares a queue, creates
> > binding and starts consuming.
> > 
> > I have noticed that OpenAMQ topic queue starts accumulate messages right
> > after the binding was created, even there is no consumer - client didn't
> > call ..._consume yet. So what happens on high volume messages load, is
> > that queue size reaches the limit and gets killed by server, before
> > client starts consuming from it.
> 
> Is there a problem in doing queue.create, basic.consume & queue.bind in 
> that order?
> 
> > I thought that queue profile will help me
> >     <queue_profile name = "shared">
> >         <limit name = "warn" value = "50000" />
> >         <limit name = "trim" value = "100000" />
> >     </queue_profile>
> > 
> > but I noticed that my Queue still gets killed, even I set it to trim.
> > Does "trim" works for shared queues? Is there another way to postpone
> > consumption from the bound queue?
> 
> This looks like a bug. What kind of behaviour are you getting exactly? 
> We'll have a look at it.
> 
> > When my client wants to stop consuming queue messages, it calls
> > amq_client_session_basic_cancel. I noticed that this call takes
> > significant amount of time on high volume queues. When it waits
> > on ...basic_cancel call, I still see messages going to it from OpenAMQ
> > server. 
> > I tried ..._nowait version of cancel and it helps my application, but I
> > am not sure if I play nice to amq server.
> 
> Nowait versions of individual commands behave the same as original 
> commands, the only difference being that command completion confirmation 
> is not sent to the client. This means that when you issue cancel_nowait, 
> your application is free to continue, however, the cancel may have not 
> been actually executed yet. If will be executed a bit later and you'll 
> continue to receive the messages in the meantime.
> 
> > Is there a proper and fast way to cancel consumption. I've looked at
> > amq_client_session_channel_flow... but I am not sure - or I should be
> > prepared to wait for several seconds on that call?
> 
> If you have a single consumer per connection, the flow-off on the 
> connection will behave in similar manner to cancel and it should be 
> faster than cancel (I believe there is prioritisation of flow-off 
> command to the other commands implemented).
> 
> Martin
> 
> _______________________________________________
> openamq-dev mailing list
> openamq-dev at lists.openamq.org
> http://lists.openamq.org/mailman/listinfo/openamq-dev


More information about the openamq-dev mailing list