Stargate.Receiver.Processor (stargate v0.2.0) View Source
Defines a Stargate.Receiver.Processor
module as a GenStage
process under the consumer or reader supervision tree.
The processor stage performs the message handling step for all messages received on the connection by storing and calling the application's handler module on each message received.
To better handle complex or long-running operations when handling messages, the processor stage can be scaled horizontally and takes care of the necessary subscriptions both upstream and downstream within the GenStage pipeline.
During initialization, the processor stage stores several pieces of information in its process dictionary that are available to the application's message handler module when handling messages if necessary including the topicc, namespace, tenant, and persistence of the connection.
Link to this section Summary
Functions
Starts a Stargate.Receiver.Processor
GenStage process and
links it to the calling process.
Link to this section Types
Specs
raw_message() :: String.t()
Link to this section Functions
Specs
start_link(keyword()) :: GenServer.on_start()
Starts a Stargate.Receiver.Processor
GenStage process and
links it to the calling process.
Passes the configuration from the supervisors to the stage to
initialize its state and setup subscription to the
Stargate.Receiver.Dispatcher
producer stage.