(Quick Reference)

isDefault

Purpose

Sets whether the connection should be considered the default connection when a connection is not specified for an operation.

Examples

rabbitmq {
    connection = {
        connection(
            host: "rabbit.example.com",
            name: "defaultConnection",
            isDefault: true,
            username: "foo",
            password: "bar"
        )
    }
}

Description

Setting the default connection is useful in multi-server configurations. When a connection is marked as default, consumers or publishers that do not specify a specific connection will use the default connection.

In single-server configurations where only a single connection is configured, it is automatically marked as the default connection.