Skip to content

Create new processor mail-gateway-deadletter

Recipient format: <service-name>+<channel-name>+<level>@cern.ch

Make input queue configurable, since logic should be the same for both mail-gateway.dlq and mail-gateway-critical.dlq (by refactoring EMAIL_CONSUMER_NAME to CONSUMER_NAME)

  • Send email to channel owner or sender notifying of failure

Message will have two formats:

  1. Either its was manually sent to the queue with format {error, channel, channel_owner, message: {sender, subject, content, to}}
  2. Or it reach the dlq bc of to many retries in that case it will have the format {sender, subject, content, to}

For case 1 first check if message contains the key error:

  • If contains error and channel owner is not null notify channel owner of failure with error, message and channel
  • If contains error and channel or channel owner is null notify sender of failure with error and message

For case 2: (wait for ticket #13 (closed) to use same logic)

  • Try parsing to (format service+my-channel+level@cern.ch to extract channel and notify owner of unknown failure
  • If not possible notify sender of unknown failure with message
Edited by Carina Antunes