Skip to main content

Messaging resilience

This document outlines the process and considerations involved in message delivery within the ArconQ system, including scenarios of successful delivery, error handling, and application shutdowns.

Successful Message Delivery​

In ArconQ, when a message is sent, it is placed in a queue awaiting delivery to the targeted applications as soon as they start. If the message is processed successfully by the receiver application in MessageHandler, it receives an Acknowledged status, indicating that the system will not attempt further deliveries.
Each of the targeted applications have its own queue, therefore acknowledgment made by one of the apps doesn't affect the status of messages sent to other apps.

Error in MessageHandler​

If an error is thrown when a message is being processed in a MessageHandler then the message goes directly to the DLQ (Dead Letter Queue).
You can add a retry mechanism when registering the MessageHandler. More about it here.

Handling App Shutdowns​

Consider scenarios such as: shutting down an app, an update of an app's revision when it's running, app crash or an update of the whole ArconQ environment.

If an app is shut down when a message is being processed in a MessageHandler, it will remain in the queue having the Unacknowledged status.

  • It will try being redelivered next time the target app is started.
  • It will remain in the queue for the time declared in the queue's TTL (Time To Leave) setting (default is 15 min).
  • If the message is not delivered during the queue's TTL, it will go to the DLQ, where it won't be redelivered again. The message will remain here for the time declared in the DLQ's TTL setting (default is 24h). After that the message is deleted.
  • More about the topic of TTL settings here.

The same rules apply to when a message is sent to an app that's already stopped.