StepFlow.Amqp.CommonConsumer (StepFlow v1.2.0) View Source

Definition of a Common Consumer of RabbitMQ queue.

To implement a consumer,

defmodule MyModule do
  use StepFlow.Amqp.CommonConsumer, %{
    queue: "name_of_the_rabbit_mq_queue",
    exchange "name_of_exchange",
    consumer: &MyModule.consume/4
  }

  def consume(channel, tag, redelivered, payload) do
    ...
    Basic.ack(channel, tag)
  end
end

Link to this section Summary

Link to this section Functions

Link to this function

create_queues(channel, queue)

View Source