[Host] Consumer error response per transport (#356) #359
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@zarusz I was thinking about how to cleanly implement the message header feature (#359) which had me re-evaluate how the
Abandon
(#356) was implemented.Abandon
is only possible when using ASB and RabbitMQ, but other (future) transports may have their own requirements. As such, having anAbandon
response in theProcessResult
enum was probably a little heavy handed. I have refactored the code to rather make use of specialized types to differentiate between available responses (and hopefully make the action more clear). In this way, each provider can now support the base responses (Failure
,Success
,SuccessWithResponse
andRetry
) while also adding speciailized support fot the anything available to the transport eg.DeadLetter
(previouslyAbandon
) orFailure(IDictionary<string, object> headers)
for ASB. (Failure(...)
has not been added in this PR, but is an example that should now be trivial to add).RabbitMq looses
Abandon
but gainsRequeue
with the configuration option no longer being required.Thoughts?