This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
Aerogear 9672 - Create a retry/queuing mechanism for JMS messages #1028
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.
Motivation
We're currently using enmasse as one of our supported messaging systems. However, enmasse does not support (currently) DLQ/retry configuration. This PR let's UPS control requeuing those jms messages when we would have previously relied on the message broker.
What
This PR wraps the notification dispatcher in a try/catch block that will handle run time exceptions by looking at new metadata in the JMS message and optionally requeuing it. This behavior is configurable through environment variables.
This PR adds checks two environment variables : AMQ_MAX_RETRIES, and AMQ_BACKOFF_SECONDS. AMQ_MAX_RETRIES is the number of retries that will be sent.* AMQ_BACKOFF_SECONDS is the number of seconds to increase the delay timeout.
Verification Steps
Add the steps required to check this change. Following an example.
The point is it has to be really rude and really bad)