PersQueue v0.0.1 PersQueue.Server View Source
PersQueue.Server
is the GenServer
responsible for processing all messages.
Link to this section Summary
Functions
Acks the message
Creates a new message with the passed content
Checks if the associated with consumer process exists
Gets the message from the head of the queue
Removes the message from the running list and enqueues it to the queue
Rejects the message
Starts the message Server
Link to this section Functions
Link to this function
ack(consumer, message_id)
View Source
ack(consumer :: String.t(), message_id :: pos_integer()) :: :ok
Acks the message.
Creates a new message with the passed content.
Checks if the associated with consumer process exists.
Gets the message from the head of the queue.
Removes the message from the running list and enqueues it to the queue.
Link to this function
reject(consumer, message_id)
View Source
reject(consumer :: String.t(), message_id :: pos_integer()) :: :ok
Rejects the message.
Link to this function
start_link(consumer)
View Source
start_link(consumer :: String.t()) :: GenServer.on_start()
Starts the message Server