e_poller v0.1.1 EPoller View Source
This module serves to enable clients to initialize polling processes and have them poll on their own schedule.
Link to this section Summary
Types
A handler function that acts on each message to process it. If the handler doesn’t throw an exception for the message it’s processing, the message is deleted off the queue
A string represnting the queue’s name
Functions
Polls the queue with the config for the process assigned to pid
Initializes a queue poller with the given queue_name, message_handler, and config
Link to this section Types
A handler function that acts on each message to process it. If the handler doesn’t throw an exception for the message it’s processing, the message is deleted off the queue.
A string represnting the queue’s name
Link to this section Functions
Polls the queue with the config for the process assigned to pid.
For each message in the polling result this function:
- Calls the handler on that message
- Deletes the message from the queue (provided the handler doesn’t throw an exception)
Returns {:ok, map}
start_link(queue_name(), handler(), EPoller.Config.poller_config_opts()) :: {:ok, PID}
Initializes a queue poller with the given queue_name, message_handler, and config.
Returns {:ok, PID}