Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass SSL options down to AMQP.Connection.open/2 #137

Open
jeffhsta opened this issue Feb 6, 2025 · 1 comment
Open

Pass SSL options down to AMQP.Connection.open/2 #137

jeffhsta opened this issue Feb 6, 2025 · 1 comment

Comments

@jeffhsta
Copy link

jeffhsta commented Feb 6, 2025

As of now I have an Elixir service running on Elixir 1.14 OTP 25 and when I bump it to Elixir 1.15 OTP 26 I start getting an RabbitMQ connection error. After some investigation I see that is caused by an OTP change where the default SSL parameter were changed.

I am using AWS managed RibbitMQ that forces me to open a connection over SSL using ampqs protocol and I was able to make it work by calling AMQP.Connection.open("my-rabbitmq-url", ssl_options: [verify: :verify_none, fail_if_no_peer_cert: false]).

But I released that using BroadwayRabbitMQ I get the same issue I was getting before when doing AMQP.Connection.open("my-rabbitmq-url"), since now I need to pass the SSL options.

According to this line of code, it seems like there is no options being passed down to AMQP connection.

I am wondering what would be the best way to solve this issue.

I see two easy ways:

  • Allow the ssl_options to be passed down
  • Allow BroadwayRabbitMQ.Producer to receive on connection param not only a URL or a Keyword, but also an RabbitMQ Connection that was previously openned.

Thoughts?

@josevalim
Copy link
Member

A PR that explores passing all options forward to AMQP would be welcome!

@whatyouhide whatyouhide changed the title Pass ssl options down to AMQP.Connection.open/2 Pass SSL options down to AMQP.Connection.open/2 Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants