[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - discarding consumer messages.
ataylor
do-not-reply at jboss.com
Fri Jan 30 05:40:27 EST 2009
This is regarding https://jira.jboss.org/jira/browse/JBMESSAGING-1214.
If you consider the example where a consumer is receiving messages regarding a stock price then these messages are transitory. The consumer is only really interested in the newest messages. If the consumer is slow then these messages could build up and the information being received out of date. It should be possible to set the max number of messages to keep.
My first thought is to do this in the server consumer. during the handle method if maxNumberOfMessages is set we check how many messages the queue has and if greater we we pre ack the message without delivering and return handled. The one thing I'm not sure of is how this would work with filters since only a subset of the queue may be destined for this consumer. thoughts?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205809#4205809
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205809
More information about the jboss-dev-forums
mailing list