cancel
Showing results for 
Search instead for 
Did you mean: 

JMS Sender: Fetch messages only, if the previous message was successful

filipe_rieger
Explorer

Hello Experts,

is there a way to configure the JMS Sender Adapter in a way, that PI receives the next JMS message only, if the previous message was processed successfully?

The purpose of this, was to use our message Bus for queuing. We would like to outsource the queuing from our PI.

In some scenarios we sometimes receive so much masterdata that our PI struggles to process it, especially, if the target system is not available.

So instead of this:

ECC -(MATMAS)-> PI -> Target System

We would like to have this:

ECC -(MATMAS)-> Message Bus --(JMS)--> PI

But this makes only sense, if PI fetches the messages from the Message Bus, if the previously received MATMAS was processed successfully. Otherwise PI starts again queueing.

Accepted Solutions (0)

Answers (3)

Answers (3)

rakeshdamera
Participant
0 Kudos

Hi Filipe,

This may not be ideal in all scenarios. In some cases, the messages on the queue will be accumulating unless the previous message issue is fixed/addressed and causing JMS server to crash.

I would still let PO pull the messages, process and deliver them to the end system. You can tune the interface further to account for peak volume, message size, availability etc.

And if the target system is an SAP system capable of handling Idocs, you can have the Idocs delivered (not posted immediately) and processed through a background job to increase interface throughput.

Hope that helps.

Rakesh

JaySchwendemann
Active Contributor
0 Kudos

Hmm, not sure if this will help, but theres a (relatively) new feature for JMS with QoS BE: https://launchpad.support.sap.com/#/notes/2217210

If you could somehow manage to have new values only be posted to the queue PI listens on, when the "JMS ReplyTo Queue" mentioned in the above note is empty, you would have some starting point for further investigations.

Another possible solution would include some logic between Message Bus and PI. Your logic could pick single queue entities, post them synchronously into PI e.g. via SOAP and only pick the next one if posting was done without error. This "logic" could in theory also live on PI as it's a J2EE server, in the end.

A third solution would somewhat rely on IDocs as means of input messages: You can easily send IDoc synchronously to PI and from there also synchronously to the target. Effectively offloading queuing to the sending (ECC) system. ERP --> C4C --> CPI integration does it this way. You can monitor this then via BD87, SRT_UTIL and the like. For PI to pull it off you would need to send as xml http, alonge the lines of this https://blogs.sap.com/2011/10/19/soap-for-idoc-demystified/

Cheers

Jens

former_member190293
Active Contributor
0 Kudos

Hi Filipe!

I guess you should be able to fulfill your requirement using JMS Sender channel with Quality of Service - EOIO.

You also may refer to this note to get additional information:

1501724 - JMS Adapter multiple listeners registered with EOIO QoS

Regards, Evgeniy.

filipe_rieger
Explorer

If I enable EOIO, then then messages are still queued in PI, correct?

The idea is to have no queuing in PI. All messages should remain in the message bus if the previous message was not processed successfully.