Skip to Content
0
Feb 04, 2021 at 07:36 PM

Enterprise Message reject/retry

66 Views

I can't seem to find documentation or examples on how to reject a message and then retry it. I see that

req.reject(new Error('some error'))

will work with a request, when req is a cds.request. I also see that cds.event is a base for cds.request.

So, if i receive a message there is something wrong as part of business logic, or a system failure and I want to reprocess/retry the message HOW do I do that??

when I debug the on event

const messagingSrv = await cds.connect.to('messaging')


messagingSrv.on(topic, async (msg) => {

I see this as the EventMessage object, but there doesn't seem to be a way to fail this message and keep it in the message queue.

Thanks,

Jon

Attachments

eventmessage.png (100.9 kB)