ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mq_action_handler Class Referencefinal

Sends a message to an MQ queue on each job firing. More...

#include <mq_action_handler.hpp>

Inheritance diagram for mq_action_handler:
Inheritance graph
Collaboration diagram for mq_action_handler:
Collaboration graph

Public Member Functions

std::string_view action_type () const noexcept override
 Returns the action_type string handled by this implementation.
 
boost::asio::awaitable< std::expected< void, std::string > > execute (const action_context &ctx) override
 Execute the action for the given job.
 

Detailed Description

Sends a message to an MQ queue on each job firing.

Handles jobs with action_type == "send_mq_message". The action_payload JSON must contain: {"queue_id":"<uuid>","message_type":"<str>","payload":{...}}.

Member Function Documentation

◆ action_type()

std::string_view action_type ( ) const
overridevirtualnoexcept

Returns the action_type string handled by this implementation.

Implements action_handler.

◆ execute()

boost::asio::awaitable< std::expected< void, std::string > > execute ( const action_context ctx)
overridevirtual

Execute the action for the given job.

Returns
An expected<void, string> where the string contains the error message on failure.

Implements action_handler.