on 07-05-2021 12:57 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
User | Count |
---|---|
79 | |
11 | |
10 | |
8 | |
6 | |
6 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.