Community

Can I simulate JMS_JBOSS_DO_NOT_DELIVER_BEFORE?

created by Richard Kennard in JBoss Messaging - View the full discussion

Hi guys,

 

I am really enjoying using JBoss Messaging in JBoss AS 5.1.0.GA. Thanks for all your hard work!

 

I have a query regarding 'sending a message to the back of the queue'. I am processing messages in a cluster and sometimes a message is received but the rest of the cluster hasn't finished doing what it needs to, so that message needs to get sent to the back of the queue. Currently, I do this by just queueing up a new message.

 

The problem is, if the queue is empty, one node in the cluster will immediately pick up that message again (even though the other nodes are still processing). I want to delay this. I tried using JMS_JBOSS_SCHEDULED_DELIVERY and that almost works, but if the queue is not empty this appears to let the new message (which I have put to the end of the queue) jump the queue in accordance with the 'scheduled delivery time'.

 

What I need is like a JMS_JBOSS_DO_NOT_DELIVER_BEFORE. So if the queue is empty it will wait, but if the queue was full and it took a long time to get to the message anyway it will be processed as normal.

 

Can I implement this somehow?

 

Thanks in advance,

 

Richard.

Reply to this message by going to Community

Start a new discussion in JBoss Messaging at Community