Skip to main content

Rule Engine Action Processor

This application is used for processing actions that are triggered by Rule Engine. Currently Action Processor can send SMS or Email. Application has exposed endpoints: /action-sms and /action-email, both are signed up as a subscriber WebHook towards the Action Event Grid. On received message, for the SMS the application will send a REST POST request towards the EnCo SMS API, for the Email the application will send SMTP message towards Proximus Mailing service.

Failed communication

It is possible that due to some reasons sending SMS or Email request will fail. In that case, Rule Engine Action Processor will respond to Event Grid with 400 or 500 http code. That will trigger retry mechanism in Event Grid, currently it's set to try 5 times and 20 minutes. The messages will be retried till one of those conditions will be fulfilled. Event Grid will use its own embedded retry mechanism. Retry message will be sent after:

  • 10 seconds
  • 30 seconds
  • 1 minute
  • 5 minutes
  • 10 minutes
  • 30 minutes
  • 1 hour
  • 3 hours
  • 6 hours
  • Every 12 hours up to 24 hours

For our configuration, message will be sent to Dead Letter Queue (DLQ) after trying to resend message after 10 minutes.

Messages that are send to DLQ, are in reality saved in a Storage Account that is configured in the Event Grid (concretely in Event Subscription settings).

Rule Engine Action Processor has exposed a GET endpoint /reprocess-dlq which will trigger resending messages stored in DLQ and removing them after all. Endpoint should have a query parameter defined: messagesToReprocess, it should be a numeric value defining how many messages should be processed (defaults to 1000).