cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CAP Application Sending Duplicate Messages and DLQ Handling in CPI

shatsijev
Explorer
0 Kudos

Hello SAP Community,

I hope you're all doing well. I'm currently working on an integration project involving a CAP (Cloud Application Programming) application, SAP CPI (Cloud Platform Integration), and AMQP messaging. I've encountered two issues that have been puzzling me, and I'm seeking your valuable insights and expertise to resolve them.

Duplicate Messages in CPI

In our setup, our CAP application sends messages on a topic within the context of SAP Event Mesh, and we have a CPI integration with an AMQP connector that reads messages from a queue and processes them, ultimately sending email notifications. However, I've noticed that the CPI integration always receives two identical messages for each message sent by the CAP application. I suspect that this may be related to the CAP application sending messages on the topic instead of the queue. Can anyone guide me on how to configure SAP CAP and CDS to send messages specifically to a queue, or if there's another approach to ensure that only one message is sent and processed in CPI?

Handling Dead Letter Queue (DLQ) in CAP

Our queue within Event Mesh is configured with a Dead Letter Queue (DLQ) for handling failed messages. In CPI, I have set up a listener using messagingService.on('name/of/the/dlq', async (req) => { ... }) to handle messages that end up in the DLQ. However, it seems that the listener is not triggered when a message is moved to the DLQ. Upon further investigation, it appears that CAP's on() method primarily focuses on topics, and the same goes for emit(), which is topic-centric. Is there a way to configure CAP to specifically handle messages from a queue, including those in the DLQ?

I would greatly appreciate any insights, experiences, or solutions you can share to address these challenges. Your expertise in SAP CAP and CPI integrations would be invaluable.

Thank you in advance for your assistance!

Best regards,

Soultan Hatsijev

Accepted Solutions (0)

Answers (0)