Messages stuck in queue
1 posts in topic
Flat View  Flat View

Posted By:   Kirk_Tsai
Posted On:   Tuesday, January 20, 2004 12:46 PM

I noticed a undesirable behavior where bunch of messages (less than 500) would get stuck in the queue when one of several queue receivers (all bound to the same queue) is programatically blocked. If I unblock the receiver in question, then those messages are subsequently drained from the queue.

Is this a limitation of SwiftMQ? How do I minimize this undesirable effect? Perhaps tuning the queue cache size?

Re: Messages stuck in queue

Posted By:   Andreas_Mueller  
Posted On:   Tuesday, January 20, 2004 12:55 PM

Each consumer has a client-side cache which is 500 messages per default. When a receiver connects, this number of messages are transfered to the client-cache and then consumed from there, without interaction with the router. When a message is consumed (onMessage or receive), an ack/commit takes place and the message is deleted from the queue. Messages which are not yet consumed but in the client cache are locked but you "see" it in the queue (with a browser or the Explorer). Since they are locked, other receivers won't get it. If you kill one receiver, its messages will be unlocked and the other receiver will fill their caches with the messages.

You can change the client-cache size via the connection factory (smqp-consumer-cache-size attribute).
About | Sitemap | Contact