yeet v1.0.1 Yeet View Source

Format, enrich and send a message to a dead letter queue.

Link to this section Summary

Functions

Takes a message and formats the fields so that they can properly be encoded as json. It also enriches the message with a stack trace and timestamp.

Given a message with a dataset id and app name, send a message to the dead letter queue that contains that message, along with additional metadata.

Checks that the message can be encoded to json. If it cannot, it transforms the message into an encodable format.

Link to this section Functions

Link to this function

format_message(original_message, dataset_id, app_name, options \\ []) View Source
format_message(any(), String.t(), atom(), keyword()) :: map()

Takes a message and formats the fields so that they can properly be encoded as json. It also enriches the message with a stack trace and timestamp.

Link to this function

process_dead_letter(dataset_id, message, app_name, options \\ []) View Source
process_dead_letter(String.t(), any(), String.t(), keyword()) ::
  :ok | {:error, any()}

Given a message with a dataset id and app name, send a message to the dead letter queue that contains that message, along with additional metadata.

Link to this function

sanitize_message(message) View Source

Checks that the message can be encoded to json. If it cannot, it transforms the message into an encodable format.