sroze/messenger-enqueue-transport

On exceptions the message should not be requeued?

Closed this issue · 6 comments

On exceptions the QueueInteropTransport should not requeue the message instead of rejected it?

If this is the correct behaviour, how can I make the message at least not be rejected, to let te visibility timeout of AWS SQS set the message visible again?

Add one more transport specific exception to workaround messenger abstraction.

Can you give me some tips on how can I do it? Eg: if the database timedout, I can't throw that transport specific exception (In my application domain). Sorry if I don't understand what you had said, I'm a beginner developer.

  • catch your domain exception
  • throw a special exception that instructs an underlying transport not to do anything. Has to be implemented.

Btw enqueue itself does not get in your way. If you do not catch exception it will be redelivered once visibility timeout. If you catch it you can decide what to do: ack, reject or requeue.

That's the problem, it I'm not catching the exception and it is not being redelivered on visibility timeout.

hey, i've got the same problem. Did u solve your problem @malheirosrafa ? because I could not really understand the explanation given since for me it was the same Post you've made @makasim, the best
way to solve is to extend the SQS Transport and override the Receive method?
if so, can you post some examples yourself?