Azure / go-amqp

AMQP 1.0 client library for Go.
https://github.com/Azure/go-amqp
MIT License
108 stars 59 forks source link

how to use Exchange #345

Open mkdr4 opened 3 weeks ago

mkdr4 commented 3 weeks ago

Tell me please. Is it possible to implement sending via Exchange with a routing key. I understand that any sending goes through the default Exchange, but I would like, for example, through Topic Exchange with routing key. thanks

mkuratczyk commented 3 weeks ago

It sounds like you might be using go-amqp with RabbitMQ. If so, check out the documentation here: https://www.rabbitmq.com/docs/amqp#addresses

mkdr4 commented 3 weeks ago

@mkuratczyk Great, thanks! But the question remains with the routing key for each individual message, whether there is such a possibility in this library. 1 producer writes to different topics, for example through exchange topic the routing key. test_topic guide.first, test_topic_second, routing key first/second. thanks

mkuratczyk commented 3 weeks ago

The document I linked to describes the <null> address which allows to specify the actual address in the to field.