Hi guys, in this article I want to shared step by step How to using JMS adapter in SAP CPI. Imagine this scenario
- We send file XML from POSTMAN to 3rd system, but because of any reason, file XML can not go to SFTP. And we get complain that can not see file in SFTP. In this case we have to push data again. To resolve this issue, we use JMS adapter.
- Kindly take short look diagram
In this case, message from sender will send to queue is call message queue. And from there, they will send to SFTP. If any issue of FTP server, message will be hold and resend
Step 1 : Create integration flow for message queue.
For simple, this integration flow we will just include one sender (HTTPS) and one receiver (JMS)
Queue Name : Name of queue in CPI
When we use POSTMAN to run this integration flow We will receive message in Message Queues
Step 2 : Create integration flow consume message queue in step 1
In this step, we create new integration flow to consume message queue. We just add sender adapter is JMS with name equal name of queue in step 1, and SFTP adapter for receiver. We simulate two case
- Case 1 : Cannot connect to SFTP. We will see that message still in queue. Queue try resend message every short time
- Case 2 : Connect SFTP ok, so message send from POSTMAN to SFTP ok
This is integration flow which using JMS adapter for sender
Queue Name : Get name of message queue which config in step 1
Step 3 : Test cases
Case 1 : Message send to queue, connect to SFTP error. Message will hold in queue
- POSTMAN to queue
- Queue to SFTP -> Fail
Message hold in queue
Case 2 : Message consumed by queue
In this article, I shared how to working with message queue by JMS adapter in SAP CPI. This article will help resolve some cases which expect will resend error message. Thanks for your reading, any question kindly leave your comment below this.