You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've faced quite odd behaviour of Sneakers when I've deployed application on Heroku.
Heroku's RabbitMQ Addon provides full amqp url like amqp://login:pass@host:port/vhost, and pure Bunny do understand this string easily. However, due to https://github.com/jondot/sneakers/blob/master/lib/sneakers/queue.rb#L19 I have to parse this line, extract vhost and provide it for Sneakers manually.
Here my suggestion.
Bunny.new method supports either connection_string or hash with options, so it would be nice to leverage this feature and pass Sneakers::Config as it is. So, everyone who likes to pass :ampq and :vhost separately would be able to do that, on the other hand it would be easy to deploy on Heroku platform.
The text was updated successfully, but these errors were encountered:
So what i'm thinking is to drop :vhost entirely, and then people would configure via amqp url. However it will break running deployments of Sneakers. Although we can break API from time to time (externalized with proper versioning), I always want to minimize.
I was thinking in the direction of a new :amqp_url parameter, once given it will ignore all other parameters.
Then perhaps bigger steps in API will converge into one :amqp parameter in the future.
Just a quick note, a naked call to Bunny.new will automatically pull from $RABBITMQ_URL. Perhaps just not passing options to Bunny which haven't been explicitly set by the user will be enough?
So, @jondot, @SebastianEdwards, I think both variants are feasible. Nevertheless, my vote for "one :amqp parameter in the future", but without any suggestions about default value, because Bunny already does that under the hood and it respects $RABBITMQ_URL if the last one is presented.
I've faced quite odd behaviour of Sneakers when I've deployed application on Heroku.
Heroku's RabbitMQ Addon provides full amqp url like amqp://login:pass@host:port/vhost, and pure Bunny do understand this string easily. However, due to https://github.com/jondot/sneakers/blob/master/lib/sneakers/queue.rb#L19 I have to parse this line, extract vhost and provide it for Sneakers manually.
Here my suggestion.
Bunny.new method supports either connection_string or hash with options, so it would be nice to leverage this feature and pass Sneakers::Config as it is. So, everyone who likes to pass :ampq and :vhost separately would be able to do that, on the other hand it would be easy to deploy on Heroku platform.
The text was updated successfully, but these errors were encountered: