This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
Transient endpoints and returning un-routed messages #101
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.
Closes #43, but also related to #45 and #58.
Was a discussion way back when about whether we should change endpoints to be transient by default rather than persist even when they have no consumers available. We settled on transient by default, but never actually implemented the changes.
This should clear things up and comes with the added bonus of
mandatory: true
messages, meaning if a request is sent and cannot be routed to any endpoints, it immediately returns. In terms of "failing fast", this is ace.If people want to use the old behaviour then, well, they can't. Turning the option on or off would mean managing two different queues for the same endpoint where consumers could only consume from one at a time. That just isn't reasonable.
This is unfortunately a breaking change though. Even though the API doesn't change, the nonequivalent queue parameters means that RabbitMQ queues have to be recreated to work, meaning people's setups will break if they upgrade.