cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BTP Event Mesh

Tri
Participant
0 Kudos

Hi everyone,

I've done the tutorial Create an Application for Receiving Messages and it's working fine with the ideal scenario that every message is consumed.

Now, I'm testing the negative scenario. By saying that, I replace this line message.done(); with message.failed() (according to npm @sap/xb-msg)

And it seems that the message is not acknolwedged. Moreover, it retries every second.

I have some questions regarding this:

1. How can we set retry? I couldn't find any documentation about retry settings.

2. I couldn't find any SAP examples regarding the FAILED scenario. Hopefully someone can point me to the right direction.

Regards,

Minh

View Entire Topic
mig1
Participant

In Event Mesh, you can configure "Max Redelivery Count" on your queue. If you combine this with a Dead Message Queue, any message that fails N number of times will be moved to the DMQ.

Tri
Participant
0 Kudos

Hi mikael.gurenius4,

Thanks for your suggestion. I've created the queue via SAP Event Mesh dashboard. It only has the option Max Redelivery Count. I couldn't find where to create dead message queue.

The value of Max redelivery count is 0. Does it mean that it doesn't try to deliver again if it has failed once?

How do you create the dead message queue?

Thanks.

Minh

mig1
Participant

No, a Max Redelivery Count of 0 means unlimited attempts. Edit your queue and set Respect Time to Live in seconds. Again, 0 mans forever. Now you can choose any other queue as your Dead Message Queue. To start, create one named "DMQ" and try it out.

Tip: Instead of having a Max Redelivery Count, you can use Max Time To Live. Once reached, message will be moved to DMQ. You can also set Max Time To Live on your DMQ to automatically purge old (failed) messages after some time.

Tri
Participant
0 Kudos

Thanks Mikael.

Just another question.

The below screenshot is the my main queue. However, it doesn't show DMQ that I create, instead of that, it shows my other queue.

But when I edit DMQ, it shows the my other queues.

Do you have any ideas about this?

Regards,

Minh

mig1
Participant
0 Kudos

Yeah, the UI is rather buggy. Delete both your queues and start over. Create the DMQ first then it usually shows up in the UI as expected. If not, do it via the REST API:s instead.

aishwarya_ar
Newcomer
0 Kudos
Hi @mig1, after retrying for 3 times the message has got sent from main queue to dead queue now the message is in dead queue and the TTL is 120 sec, after that i want my message to go back to main queue. How can i do that?