itk_queue v0.12.1 ITKQueue.Worker View Source

Provides automatic registration of queue workers.

Example:

defmodule MyWorker do use ITKQueue.Worker

subscribe(“my.queue.name”, “my.routing.key”, &process/1)

def process(message) do

# do something with the message

end end

Link to this section Summary

Functions

Call to register a process to handle all messages received on a queue with the given routing key

Link to this section Functions

Link to this macro subscribe(queue_name, routing_key, handler) View Source (macro)

Call to register a process to handle all messages received on a queue with the given routing key.

See ITKQueue.subscribe/3 for more information.