When using the uri
config option port defaults to 0/nil if not specified
#304
Labels
uri
config option port defaults to 0/nil if not specified
#304
Issue
When configuring hutch using the
uri
option to connect to the rabbitmq server and you don't specify a port it defaults to 0/nil.This lead to a morning of confusion as I tried to track down why my new hutch application wouldn't connect to my rabbitmq server.
Expectations
I had expected that when not specifying the port when configuring a connection with a URI it would default to 5672 in a similar manner to using Bunny directly.
Actual Outcome
But in actually it sets the port in the
Bunny::Session
instance to 0Clearing out apart from the session inspect, note the port of 0 and the lack of a port in the string within
addresses
:It would appear that previously Hutch was set up to default to port 5672 (/5671 when amqps) when using the uri config option in this PR specifically this commit. This default appears to have since been removed.
Personally I'd think that defaulting to ports 5672 / 5671 when unspecified would be more in line with a user's expectations than defaulting to port 0 when unspecified.
Would you be interested in PR to restore the functionality that was implemented in #159 & a regression test to stop the default being lost again?
The text was updated successfully, but these errors were encountered: