Add method and class IDs to channel errors #447
Merged
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.
What
This change adds a
methodId
andclassId
property to the channel errors.Motivation
I have a higher level configuration for the topology that allows automatic deletion of exchanges and queues. I perform a
deleteExchange
/deleteQueue
withifUnused
/ifEmpty
options set, and against exchanges and queues that no longer exist. These operations will fail with an error in some cases. Currently it is only possible to determine if there was apreconditionfailed
error code (406) and not what operation failed. In the case of bad topology, for example a binding to a queue that does not exist, I produces a critical error fault in our monitoring system. In the case of a failure to delete an exchange or queue, I want to ignore the error, but currently cannot. With this change, errors will contain the class and method IDs, so that the source and type of error can be determined.Notes
error.code
check. I'm unsure on how or where to add any additional tests that may be needed.