RabbitMQ connection string

Introduction


9dc0c691-120a-4743-9994-9c57e2561bba.rabbitmq_connectionstring_md

AMQP URL schema

  amqp://username:password@localhost:5672/virtualhost/exchange?routingKey=value

amqp://
schema name
username:password
rabbit mq user info, if absent guest:guest is used
localhost
broker hostname
5672
node port, if absent 5672 is used
virtualhost
virtual host (optional)
exchange
exchange name used for dispatching messages (optional)
routingKey=value

Specifies routing key value (optional)

Virtual host and exchange are both optional, however if only one specified it is considered to be exchange name, rather then virtual host name

Routing key will be used to publish and subscribe for messages, however by default amq.headers exchange is being used, which is routing key agnostic

✔️ Examples

Local host with default port

Xem thêm



Updated on : 2022-06-23 11:59:35. by : . at X1-Extreme.

Topic : rabbitmq.connectionstring