Available

amalgame-rabbitmq

RabbitMQ / AMQP 0.9.1 via librabbitmq.

amc package add rabbitmq GitHub ↗ ← Back to the ecosystem

Overview

AMQP 0.9.1 protocol implementation via dynamic-link binding to librabbitmq (the official C client). Compatible with RabbitMQ, Apache Qpid, CloudAMQP. AMQP 0.9.1 remains the reference protocol for workflows: exchanges + queues + bindings + routing keys.

Features

  • Exchanges (direct, fanout, topic, headers)
  • Durable, exclusive, auto-delete queues
  • Publish + Consume + Ack / Nack / Reject
  • TLS via the librabbitmq chain
  • Compatible: RabbitMQ, Apache Qpid, CloudAMQP

Example

Minimal usage example — copy-paste runnable after install.

amc package add rabbitmq

let conn = AmqpConn.Connect("amqp://guest:guest@localhost:5672")
let ch = conn.Channel()
ch.QueueDeclare("tasks", true, false, false)
ch.Publish("", "tasks", "process-image:42")
ch.Consume("tasks", fn(msg) {
    process(msg.Body)
    ch.Ack(msg.DeliveryTag)
})

At a glance

Related packages