wagslane / go-rabbitmq

A wrapper of streadway/amqp that provides reconnection logic and sane defaults
https://blog.boot.dev/golang/connecting-to-rabbitmq-in-golang-easy/
MIT License
772 stars 126 forks source link

WithPublishOptionsMandatory not return error? #184

Open brounnoupegreula-7757 opened 2 weeks ago

brounnoupegreula-7757 commented 2 weeks ago

hi guys when i dont have exchange or queue why this WithPublishOptionsMandatory not return error insted just inform logger error exchange not found and try reconnect it? there is method if no exchange or queue i dont want to publish message?

already use WithPublishOptionsExchange, but still is just inform not return error in .publish

{"level":"error","ts":"2024-09-01T18:18:03+07:00","msg":"attempting to reconnect to amqp server after close with error: Exception (404) Reason: \"NOT_FOUND - no exchange 'event' in vhost '/'\""}
{"level":"info","ts":"2024-09-01T18:18:03+07:00","msg":"waiting 5s seconds to attempt to reconnect to amqp server"}