View Source GenericExecutor behaviour (reactive_commons v0.8.3)

Implements generic behaviour for message executors

Link to this section Summary

Callbacks

Decode message payload from MessageToHandle.

Extract handler function path (name) from the message.

It's called when handler return (optional).

Link to this section Types

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

Link to this section 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).

Link to this section 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