Cyril, For example, you can store a reference to the session in the MessageLIstener field and call session methods rollback/commit in onMessage.
Kind Regards, Alex On Fri, 29 Mar 2019 at 14:11, Cyril Micoud <[email protected]> wrote: > Hi Alex, > > I use an implementation class of MessageListener so this class has no > information about Consumer, Session, Connection... > So how I can rollback with only message information without throw > RuntimeExcepton ? message can't rollback itself or has session access... > > Thanks by advance, > Best regards, > > > Cyril MICOUD > Software Development Engineer > σLink Team > > > Office: +33 (0)4 76 33 59 88 > email: [email protected] > Skype: cyril.micoud_vitech > > > > Vi TECHNOLOGY > Rue de Rochepleine - 38120 SAINT EGREVE - France > Further information at www.vitechnology.com > > You are hereby formally notified that all information contained in this > communication and any attachments shall be deemed strictly confidential and > privileged unless explicitly stated otherwise. Please note that your use of > confidential information may be governed, and restricted, by a > non-disclosure agreement. The information contained in this communication > and any attachments is disclosed for the sole use of the intended > recipient(s). If you are not the intended recipient, you are hereby > formally notified that any unauthorized review, use, disclosure or > distribution of this message is prohibited. Please notify the sender > immediately by replying to this message and destroy all copies of this > message and any attachments. Mycronic is neither liable for the proper and > complete transmission of the information contained in this communication, > nor for any delay in its receipt. Please note that email correspondence > generally includes processing of personal data. For information on > Mycronic’s processing of your personal data, please see our Privacy Policy: > http://www.mycronic.com/fr/about-us/privacy-policy/ > > -----Message d'origine----- > De : Oleksandr Rudyy <[email protected]> > Envoyé : jeudi 28 mars 2019 18:46 > À : [email protected] > Objet : Re: [Qpid JMS & Broker-J] how to manage DLQ > > Hi Cyril, > > You need to use transactions and rollback the receiving transaction as > many times as maximum delivery attempts value configured on the queue. > When delivery counter reaches maximum delivery attempts value, the message > will be moved into DLQ. > > With legacy JMS client for AMQP 0-x you can also use CLIENT_ACK > acknowledgement mode recover call with destination 'rejectBehaviour' set to > 'server' to increment delivery counter. > > Kind Regards, > Alex > > > On Thu, 28 Mar 2019 at 16:08, Cyril Micoud <[email protected]> > wrote: > > > Hi all, > > > > I have configured a Queue "A" and it Alternate Binding Queue "A_DLQ" > > (used as Dead Letter Queue). > > I have create my own MessageListener to implement onMessage(message)... > > But for some reason the message or the content is not valid... so what > > I must do to redirect the message to the DLQ? I throw a > > RuntimeException but the message is always "redelivered"... > > > > Thanks by advance, > > Best regards, > > > > > > Cyril MICOUD > > Software Development Engineer > > σLink Team > > > > > > Office: +33 (0)4 76 33 59 88 > > email: [email protected] > > Skype: cyril.micoud_vitech > > > > > > > > Vi TECHNOLOGY > > Rue de Rochepleine - 38120 SAINT EGREVE - France Further information > > at www.vitechnology.com > > > > You are hereby formally notified that all information contained in tis > > communication and any attachments shall be deemed strictly > > confidential and privileged unless explicitly stated otherwise. Please > > note that your use of confidential information may be governed, and > > restricted, by a non-disclosure agreement. The information contained > > in this communication and any attachments is disclosed for the sole > > use of the intended recipient(s). If you are not the intended > > recipient, you are hereby formally notified that any unauthorized > > review, use, disclosure or distribution of this message is prohibited. > > Please notify the sender immediately by replying to this message and > > destroy all copies of this message and any attachments. Mycronic is > > neither liable for the proper and complete transmission of the > > information contained in this communication, nor for any delay in its > > receipt. Please note that email correspondence generally includes > > processing of personal data. For information on Mycronic's processing of > your personal data, please see our Privacy Policy: > > http://www.mycronic.com/fr/about-us/privacy-policy/ > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] For > > additional commands, e-mail: [email protected] > > > > >
