View Source Datapio.MQ.Consumer behaviour (Datapio OpenCore v0.1.0)
Distributed queue consumer.
Link to this section Summary
Functions
Return a specification to run the consumer under a supervisor
Shutdown the consumer
Start a consumer linked to the current process
Link to this section Types
Specs
consumer_id() :: atom() | String.t() | pos_integer()
Consumer Identifier
Specs
consumer_option() :: {:module, module()} | {:id, consumer_id()} | {:queue, String.t()} | {:data, any()}
Available consumer option
Specs
consumer_options() :: [consumer_option(), ...]
Consumer options
Link to this section Callbacks
Specs
Specs
handle_shutdown(term()) :: :ok
Link to this section Functions
Specs
child_spec(consumer_options()) :: Supervisor.child_spec()
Return a specification to run the consumer under a supervisor
Specs
shutdown(module(), consumer_id()) :: :ok
Shutdown the consumer
Specs
start_link(consumer_options()) :: GenServer.on_start()
Start a consumer linked to the current process