Hi,

I have this needs:

 * I receive message M1
 * I process M1 and for a particular scenario I can't process this
   message right now
 * If I send back ackType MODIFIED_FAILED, the message will be
   immediately available for another consuming attempt, but I would
   like to "delay" it a bit. In this way I can receive other messages
   and then, in the next consuming attempt, probably this message M1
   can be consumed successfully.

We consume messages from Azure Service Bus queue and asking their experts how to delay next consuming message attempts, they told us: for those messages you shouldn't send any acknowledge, just "let them go", in this way Azure Service Bus keeps them locked until "Duration Lock" expires. "Duration Lock" is the period of time that the queue waits for an acknowledge, if it expires, the message is considered lost and it comes available for another message consuming attempt.

I tried to avoid acknowledge for this kind of messages, but I noticed this behavior:

 * I receive message M1
 * I process M1 and for a particular scenario I can't process this
   message right now
 * I avoid to send acknowledge and so method "onMessage()" finishes
 * I receive message M2
 * I process M2 successfully
 * I call acknowledge with acktype ACCEPTED for M2.
     o Qpid library uses ACCEPTED ackType for all messages which are
       not yet acknowleged, so it sends ACCEPTED even for M1.

Having this behavior, I must send acknowledge for each message, otherwise I could send the wrong ackType.

My questions are:

 * Is this a bug or a feature this behavior of sending acknowledge even
   for all messages not yet acknowledged?
 * Is there a best practise to delay a next consuming attempt after a
   consuming failed?

Best Regards

--
SMC Consulting <http://www.smcconsulting.it>

facebook <http://www.facebook.com/SMC-Consulting-Srl-597548223675024/> linkeding <http://www.linkedin.com/company/smc-consulting-srl> *Alessandro Crotti*
Senior Developer

tel:  +39 342 573 4450
skype:  crotti.alessandro

*SMC Consulting* <http://www.smcconsulting.it>
Via dell'industria, 87 41012 Carpi (MO) - Italy
tel: +39 059 664875

CONFIDENTIALITY NOTICE: This message may contain confidential and/or privileged information. If you are not the intended recipient, please do not use its contents for any purpose, advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Reply via email to