e_poller v0.1.0 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
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 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}
Link to this function
start_link(queue_name, handler, config \\ [])
View Source
start_link(binary(), function(), list()) :: {:ok, PID}
Initializes a queue poller with the given queue_name
, message_handler
, and config
.
Returns {:ok, PID}