How to Backout messages using JMS? - Websphere

This is a discussion on How to Backout messages using JMS? - Websphere ; I have a session bean that listens to messages from MQ.When there is a poison message causing an exception i wish to put it in the backout Q after the retry count in MQ expires.However, what actually happens wen i ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: How to Backout messages using JMS?

  1. How to Backout messages using JMS?

    I have a session bean that listens to messages from MQ.When there is a poison message causing an exception i wish to put it in the backout Q after the retry count in MQ expires.However, what actually happens wen i rollback the transaction is that the message goes back to the same queue.The backout threshold increases in MQ, but never the message never goes to the backout Queue.Am i missing something somewhere?What should i do if i want the message to be put in the backout Queue.

  2. Re: How to Backout messages using JMS?

    If you want the message put to the backout Q you have to put it there
    yourself. MQ maintains the definitions of the queue name and threshold but
    does not put the message there for you

    --
    Bob Buxton



    wrote in message
    news:1392495554.1112701895753.JavaMail.wassrvr@lts gwas007.sby.ibm.com...
    > I have a session bean that listens to messages from MQ.When there is a

    poison message causing an exception i wish to put it in the backout Q after
    the retry count in MQ expires.However, what actually happens wen i rollback
    the transaction is that the message goes back to the same queue.The backout
    threshold increases in MQ, but never the message never goes to the backout
    Queue.Am i missing something somewhere?What should i do if i want the
    message to be put in the backout Queue.



  3. Re: How to Backout messages using JMS?

    Thanks for the reply.However i dont understand what is the use of giving the backout queue and backout threshold setting in MQ, if anyways i have to do the job of backing out the message.Who uses these settings then?

  4. Re: How to Backout messages using JMS?

    They are there to provide information to your application so that you don't
    have to hard code backout queue names into your application or find other
    means of getting configuration information into your application.

    --
    Bob Buxton



    wrote in message
    news:1688194001.1112709118866.JavaMail.wassrvr@lts gwas007.sby.ibm.com...
    > Thanks for the reply.However i dont understand what is the use of giving

    the backout queue and backout threshold setting in MQ, if anyways i have to
    do the job of backing out the message.Who uses these settings then?



  5. Re: How to Backout messages using JMS?

    When using a JMS MessageListener, the MQ JMS API will do this for you
    automatically. So, if your onMessage() method fails more than your set
    threshold the message will be put on the backout queue by the API.

    /niklas
    http://www.protocol7.com

    ribalaji@in.ibm.com wrote:
    > I have a session bean that listens to messages from MQ.When there is a poison message causing an exception i wish to put it in the backout Q after the retry count in MQ expires.However, what actually happens wen i rollback the transaction is that the message goes back to the same queue.The backout threshold increases in MQ, but never the message never goes to the backout Queue.Am i missing something somewhere?What should i do if i want the message to be put in the backout Queue.


  6. Re: How to Backout messages using JMS?

    Hi,

    I have the same problem: I want to manage "poisoned" messages with my java application using JMS API.



    I have set this parameters on MQ server:

    -BOQNAME('PRT.REQUEST.BOQ')

    Name of queue to which applications should write messages that have been backed out.

    -BOTHRESH (3)

    Number of processing attempts for each message.



    Putting the rollebacked massage in a BOQNAME queue is no automatic but It's necessary to modify my code.



    I must check the backout count on every message read, and if it is non-zero, compare it to the backout threshold defined on the queue. If the count is greater than the threshold, the message should be written to the queue specified in the BOQNAME parameter and committed.



    So I have used a property on JMS to catch out the backout count on a message.

    It's msg.getIntProperty("JMSXDeliveryCount").

    I need to compare this JMSXDeliveryCount with BOTHRESH and send the message on BOQNAME.

    How can I read BOTHRESH and BOQNAME on a Queue using JMS API?



    Thanks in advance.



    T.

  7. Re: How to Backout messages using JMS?

    I need to read Queue properties setting on MQ server like BOTHRESH and BOQNAME using JMS API.



    I need to use a MQ method like MQManagedObject.inquire...



    Please, help me....

+ Reply to Thread