cancel
Showing results for 
Search instead for 
Did you mean: 

if error in SAP PI ..how to rollback message on JMS queue( JMS - PI - IDOC)

Former Member
0 Kudos

Hello everyone,

Scenario is JMS to PI to IDOC. Now interface is working fine.. but there is one small problem suppose PI reads message from JMS so it will get consumed and will not be available in JMS .. and after reading it got failed in mapping then we need to rollback the message back to JMS queue.. but currently as its gets consumed while reading PI not able to rollback it if anything goes wrong in PI.

We are using u201CTransactional JMS sessionsu201D and have maintain some wait time to u201Cwait after message erroru201D.

Any idea..how to rollback message on JMS queue.. if error in SAP PI.

Thanks,

Bhupesh

Accepted Solutions (0)

Answers (1)

Answers (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

i dont think its possble to rollback message in to Queue once again,We can restart the failed message in PI.

Former Member
0 Kudos

HI ,

Then I donu2019t really understand the use of "Transactional JMS sessions" check box available in JMS sender communication channel under processing tab.

in help.sap its mentioned that use transactional JMS session and provide wait time to "wait after message error" on processing tab so it will use that time to rollback message.. but really not able to get how we can achieve this..

Thanks,

Bhupesh

Former Member
0 Kudos

any idea on this..?

Thanks,

Bhupesh

former_member854360
Active Contributor
0 Kudos

Hi Bhupesh,

Transactional JMS Session

In error scenario case, if transaction JMS session is checked then the message will put back into the queue and re sends the same message again and again. Consider one example, there are many customers accessing the same scenario. Assuming customer1 tries to access some details, but scenario failed. JMS message put back into the queue and tries to send again and again. At this time all other customers cannot access the same scenario. It is always better not to check transactional JMS session in communication channel, apart from cases where it is mandatory.

You can group a series of operations into an atomic unit of work called a transaction. If any one of the operations fails, the transaction can be rolled back, and the operations can be attempted again from the beginning. If all the operations succeed, the transaction can be committed.

In a JMS client, you can use local transactions to group message sends and receives. The JMS API Session interface provides commit and rollback methods that you can use in a JMS client. A transaction commit means that all produced messages are sent and all consumed messages are acknowledged. A transaction rollback means that all produced messages are destroyed and all consumed messages are recovered and redelivered unless they have expired.

A transacted session is always involved in a transaction. As soon as the commit or the rollback method is called, one transaction ends and another transaction begins. Closing a transacted session rolls back its transaction in progress, including any pending sends and receives.

Former Member
0 Kudos

HI

We are already using this "transactional JMS session" but found that PI not able to rollback message back to JMS queue even if there is error.

so would like to know how to achieve this..

Thanks,

Bhupesh