Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

RabbitMQ (AMQP)

Schemes: amqp://, amqps://, rabbitmq://, rabbitmqs://

Query parameters recognised as config fields for this connector. The object-typed tls is set with a JSON literal, e.g. ?tls={...}. Any other ?key=value pair is passed through unchanged as a driver option on the connection URL.

NameTypeRequiredDefaultDescription
delayed_ackbooleannofalse(Publisher only) If true, do not wait for an acknowledgement when sending to broker. Defaults to false.
exchangestringnoThe exchange to publish to or bind the queue to.
no_declare_queuebooleannofalse(Publisher only) If true, do not attempt to declare the queue. Assumes the queue already exists. Defaults to false.
no_persistencebooleannofalseIf true, declare queues as non-durable (transient). Defaults to false. Affects both Consumer (queue durability) and Publisher (message persistence).
passwordstringnoOptional password for authentication.
prefetch_countintegerno(Consumer only) Number of messages to prefetch. Defaults to 100.
queuestringnoThe AMQP queue name.
subscribe_modebooleannofalse(Consumer only) If true, act as a Subscriber (fan-out). Defaults to false.
tlsobjectnosee belowTLS configuration.
urlstringyesAMQP connection URI. The lapin client connects to a single host specified in the URI. If it contains userinfo, it will be treated as a secret. For high availability, provide the address of a load balancer or use DNS resolution that points to multiple brokers. Example: “amqp://localhost:5672/vhost”.
usernamestringnoOptional username for authentication.

Struct-typed fields

tls

TLS configuration for secure connections.

Configures Transport Layer Security (TLS/SSL) for encrypted communication. Supports both client certificate (mutual TLS) and server certificate validation.

Examples

use mq_bridge::models::TlsConfig;

let tls = TlsConfig {
    required: true,
    ca_file: Some("/path/to/ca.pem".to_string()),
    cert_file: Some("/path/to/cert.pem".to_string()),
    key_file: Some("/path/to/key.pem".to_string()),
    ..Default::default()
};
NameTypeRequiredDefaultDescription
accept_invalid_certsbooleannofalseIf true, disable server certificate verification (insecure).
ca_filestringnoPath to the CA certificate file.
cert_filestringnoPath to the client certificate file (PEM).
cert_passwordstringnoPassword for the private key (if encrypted).
key_filestringnoPath to the client private key file (PEM).
requiredbooleannofalseIf true, enable TLS/SSL.