nextgenhealthcare / connect

The swiss army knife of healthcare integration.
Other
935 stars 280 forks source link

[BUG] HTTP Sender queue never ends retrying #6313

Open ppazos opened 1 month ago

ppazos commented 1 month ago

Describe the bug

I have an HTTP Sender destination with Queue Messages = On Failure with 5 retries each 10000 ms.

There is an alert configured to send an email when the destination fails.

When I get a 400 from the HTTP, the messages is queued and retried.

What was strange is that I received about 700 emails because of the alert, and all were because of a single message failed.

So the retry wasn't just retrying 5 times and then marking the destination with ERROR, the message was queried and retried infinitely.

To Reproduce

Steps to reproduce the behavior:

  1. Create a channel with an HTTP Sender
  2. Set the queue messages to on failure with 5 retries and each 10000ms
  3. Create an alert that sends an email when the destination fails
  4. Configure the server to always return a 400 error
  5. Deploy and send a message to the channel
  6. Check the destination is always queued and also check the emails received

Expected behavior It should retry 5 times and then mark the destination with ERROR.

Actual behavior It didn't stop retrying.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Workaround(s) Removed queue messages

Shurazi commented 1 month ago

With your configuration, what happens is that the connector retries 5 times and then queues the message. A queued message will retry forever. Since you do not want your messages to retry forever, you should not queue the messages at all.

If you want your connector to retry 5 times and then error, you should set it to Queue Messages - Never and then set the Retry Count to 5.