AMQP.Connection doesn't pick the default SSL configuration
ggcampinho opened this issue · 1 comments
ggcampinho commented
We are using :broadway_rabbitmq
and the config in runtime.exs
is similar to the one below, working perfectly.
config :amqp, connection: [url: "amqp://guest:guest@myhost:12345"]
The issue was after migrating to an amqps
connection that required SSL and I changed the config to:
config :amqp, connection: [url: "amqp://guest:guest@myhost:12345", ssl_options: [...]]
The application would crash with:
[error] Cannot connect to RabbitMQ broker: {:options, :incompatible, [verify: :verify_peer, cacerts: :undefined]}
After some digging into the application, I found that the correct configuration would be:
config :amqp, connection: [url: "amqp://guest:guest@myhost:12345"]
config :amqp_client, ssl_options: [...]
It seems that AMQP.Connection
doesn't pass the SSL config down to :amqp_client
.