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

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

Summary

Functions

Link to this function

create_queues(channel, queue)

View Source
Link to this function

get_channel_check_interval()

View Source
Link to this function

init_amqp_connection(connection, queue, exchange_name, prefetch_count \\ nil)

View Source
Link to this function

rabbitmq_connect(url, options, queue, exchange, prefetch_count)

View Source
Link to this function

rabbitmq_disconnect(state)

View Source