dashbitco/broadway_rabbitmq

AmqpClient should accept connection also in URI format

silviurosu opened this issue · 1 comments

BroadwayRabbitMQ.AmqpClient validates connection params and accepts only a keyword list: https://github.com/plataformatec/broadway_rabbitmq/blob/3a7c7a68811dbcf723d8bc805e22a7eca27934ce/lib/broadway_rabbitmq/amqp_client.ex#L115

But AMPQ.Connection.open accepts also a binary for the url: https://hexdocs.pm/amqp/1.1.1/AMQP.Connection.html#open/1 in the form of "amqp://user:pass@server/db".
I can not set the rabbitmq connection param from ENV due to this limitation.
Can we change it to accept also a uri. We can validate the URI format if required.

Thanks for the report, duplicate of #18. :)