Amqpx.Queue.subscribe
You're seeing just the function
subscribe
, go back to Amqpx.Queue module for more information.
Link to this function
subscribe(channel, queue, fun)
Specs
subscribe(Amqpx.Channel.t(), Amqpx.Basic.queue(), (String.t(), map() -> any())) :: {:ok, String.t()} | Amqpx.Basic.error()
Convenience to consume messages from a Queue.
The handler function must have arity 2 and will receive as arguments a binary with the message payload and a Map with the message properties.
The consumed message will be acknowledged after executing the handler function. If an exception is raised by the handler function, the message is rejected.
This convenience function will spawn a process and register it using Amqpx.Basic.consume.