View Source GenericExecutor behaviour (reactive_commons v1.0.2)

Implements generic behaviour for message executors

Summary

Callbacks

Decode message payload from MessageToHandle.

Extract handler function path (name) from the message.

It's called when handler return (optional).

Types

@type handler_response() :: any()
@type parsed_payload() :: map()

Callbacks

@callback decode(MessageToHandle.t()) :: parsed_payload()

Decode message payload from MessageToHandle.

Link to this callback

get_handler_path(t, parsed_payload)

View Source
@callback get_handler_path(MessageToHandle.t(), parsed_payload()) :: String.t()

Extract handler function path (name) from the message.

Link to this callback

on_post_process(handler_response, t)

View Source
@callback on_post_process(handler_response(), MessageToHandle.t()) :: any()

It's called when handler return (optional).

Functions

Link to this function

report_to_telemetry(type, handler_path, duration, result)

View Source
Link to this function

requeue_or_ack(msg, error_info, msg_type)

View Source