RabbitMQ
Every message in a queue starts an agent run, and results go to an exchange as persistent, confirmed messages. connic acknowledges each message once its runs are stored.
- Modes
- Inbound, Outbound
- Set up in
- Dashboard or connectors/*.yaml
- Documentation
- RabbitMQ docs
- Publisher
- By connic
Turn every message into an agent run
An inbound connector consumes one queue and starts each linked agent once per message, with the message as its input.
- JSON keeps its shape
- A JSON object arrives with its top-level fields, plus _rabbitmq with the queue, exchange, routing key, message ID, headers and timestamp.
- Text arrives as text
- Any other body arrives under message: other JSON values as parsed, plain text as a string.
- Files in the message
- A JSON object can carry a files array with each file's name, MIME type and base64 data, up to 50 files and 32 MiB in total.
{
"order_id": "ord_8812",
"customer": "jana@example.com",
"total": 184.5
}{
"order_id": "ord_8812",
"customer": "jana@example.com",
"total": 184.5,
"_rabbitmq": {
"queue": "orders",
"exchange": "events",
"routing_key": "orders.created",
"message_id": "ord_8812-created",
"correlation_id": null,
"content_type": "application/json",
"headers": {},
"timestamp": "2026-10-13T09:00:00+00:00",
"redelivered": false
}
}Acknowledge each message after its runs are stored
connic acknowledges a message once a queued run exists for every linked agent, so a restart or a deploy doesn't drop work, and long runs don't hold the message.
- One run per message
- A message delivered again reuses its stored run, matched by message_id, or by body and headers without one.
- Failed runs stay in Agent Runs
- A run that fails after it was stored doesn't redeliver the message. It keeps its full input in Agent Runs, where you can re-run it.
- Shared queues
- Several connectors on the same queue split its messages: RabbitMQ delivers each message to one of them.
Receive
RabbitMQ sends up to prefetch messages ahead, and connic handles them in arrival order.
Store
connic stores a queued run for every linked agent. Stored runs survive worker restarts and deployments.
Acknowledge
The message is acknowledged. If storing a run fails, the message goes back to the queue and arrives again after a short delay.
basic.ackRun
Runs execute in parallel up to max_concurrent_runs. A concurrency rule on a field such as the order ID starts runs for the same value one at a time.
concurrency.key: order_id
Keep the consumer next to your agents
Declare it as a YAML file in connectors/. Host, user and TLS live in a Connection, so the file names only the queue and the prefetch. A consumer declared in code starts reading when its deployment goes live.
- TLS by default
- connic connects over TLS and checks the broker's certificate. For a private CA, paste its PEM contents into the Connection.
- Private brokers
- Direct connections need a broker that resolves to public IP addresses. Reach a broker inside your network through a bridge.
type: rabbitmq
mode: inbound
name: Order events
connection: orders-rabbitmq
config:
queue: orders
prefetch: 10
agents:
- order-processorPublish results to an exchange
An outbound connector publishes each completed run to an exchange with its routing key, and waits for the broker to confirm it.
- Persistent and confirmed
- Messages use persistent delivery mode and publisher confirms. A message that no queue takes fails the delivery instead of disappearing.
- Run ID as message ID
- Each message carries the run ID as message_id, so consumers can drop duplicates after a retry.
- Let the agent publish
- Linked as an agent tool, the connector lets the model publish its own payload during the run.
type: rabbitmq
mode: outbound
name: Order results
connection: orders-rabbitmq
config:
exchange: order-results
routing_key: orders.processed
agents:
- name: order-processor
outbound:
usage: automatic
source: [order-events]{
"run_id": "550e8400-e29b-41d4-a716-446655440000",
"agent_name": "order-processor",
"status": "completed",
"output": "ord_8812 approved for standard shipping.",
"error": null,
"started_at": "2026-10-13T09:00:01Z",
"ended_at": "2026-10-13T09:00:05Z",
"token_usage": {
"input_tokens": 642,
"output_tokens": 38,
"thinking_tokens": 0,
"cached_input_tokens": 0,
"total_tokens": 680
}
}Where RabbitMQ fits
Pick a setup to see which queue starts the run, what the agent receives and where the result goes.
Each order event starts a run, and the result lands on the order-results exchange.
{
"order_id": "ord_8812",
"customer": "jana@example.com",
"total": 184.5,
"_rabbitmq": {
"queue": "orders",
"exchange": "events",
"routing_key": "orders.created",
"message_id": "ord_8812-created",
"correlation_id": null,
"content_type": "application/json",
"headers": {},
"timestamp": "2026-10-13T09:00:00+00:00",
"redelivered": false
}
}{
"run_id": "550e8400-e29b-41d4-a716-446655440000",
"agent_name": "order-processor",
"status": "completed",
"output": "ord_8812 approved for standard shipping.",
"error": null,
"started_at": "2026-10-13T09:00:01Z",
"ended_at": "2026-10-13T09:00:05Z",
"token_usage": {
"input_tokens": 642,
"output_tokens": 38,
"thinking_tokens": 0,
"cached_input_tokens": 0,
"total_tokens": 680
}
}The agent reads each new ticket and publishes the team and priority for the helpdesk to pick up.
{
"ticket_id": "T-48213",
"subject": "Invoice shows the wrong VAT number",
"customer": "acme-gmbh",
"_rabbitmq": {
"queue": "support-tickets",
"exchange": "events",
"routing_key": "tickets.opened",
"message_id": "T-48213-opened",
"correlation_id": null,
"content_type": "application/json",
"headers": {},
"timestamp": "2026-10-13T09:00:00+00:00",
"redelivered": false
}
}{
"payload": {
"ticket_id": "T-48213",
"team": "billing",
"priority": "normal"
}
}A scanned invoice arrives with the message, and the agent extracts the fields your ERP needs.
{
"supplier": "Nordlicht Logistik",
"files": [
{ "name": "invoice-2210.pdf", "mime_type": "application/pdf", "data": "JVBERi0xLjcK..." }
],
"_rabbitmq": {
"queue": "invoices",
"exchange": "events",
"routing_key": "invoices.received",
"message_id": "inv-2210",
"correlation_id": null,
"content_type": "application/json",
"headers": {},
"timestamp": "2026-10-13T09:00:00+00:00",
"redelivered": false
}
}{
"payload": {
"invoice_number": "2210",
"total": 1840.0,
"currency": "EUR",
"due_date": "2026-11-12"
}
}A delayed shipment starts a run, and the agent emails the customer the new delivery date.
{
"shipment_id": "shp_5531",
"order_id": "ord_8812",
"status": "delayed",
"new_eta": "2026-10-16",
"_rabbitmq": {
"queue": "shipment-updates",
"exchange": "events",
"routing_key": "shipments.delayed",
"message_id": "shp_5531-delayed",
"correlation_id": null,
"content_type": "application/json",
"headers": {},
"timestamp": "2026-10-13T09:00:00+00:00",
"redelivered": false
}
}{
"body": "Your order ord_8812 is running late. It now arrives on October 16.",
"to": "jana@example.com",
"subject": "New delivery date for your order"
}RabbitMQ FAQ
More connectors
Jira
Run an agent on new issues, issue updates and comments in Jira Cloud. It comments back or creates a new issue.
Inbound · Outbound
Notion
Run an agent when pages are created or changed or comments are added in Notion. It replies in the comment's discussion or creates a new page.
Inbound · Outbound
Outlook (Microsoft 365)
Run an agent on new email in a Microsoft 365 mailbox and reply in the same thread. connic signs in with your own Entra ID app. Attachments included.
Inbound · Outbound
Telnyx Voice
Answer and place calls on your Telnyx number with a voice agent. connic sets up Call Control and streams the conversation.
Sync · Outbound
Twilio Messaging
Receive SMS, MMS, WhatsApp, and RCS messages with an agent. Send replies, media, and WhatsApp templates through your Twilio account.
Inbound · Outbound
Twilio Voice
Answer and place calls on your Twilio number with a voice agent. Use its tools and knowledge throughout one continuous conversation.
Sync · Outbound