Closed stefanosala closed 3 years ago
@stefanosala Thanks for the PR and for updating the tests
The only thing I would ask is that you update the commit message to follow our commit style guide https://github.com/Foo-Foo-MQ/foo-foo-mq/blob/main/HOW_TO_CONTRIBUTE.md#commit-style with this as a BREAKING CHANGE:
given the default port for useSSL
is changing
@auroq any additional questions or concerns?
@zlintz is this good? :)
I believe so
Looks good to me. Calling it a breaking change is a good idea since it modifies a default.
Merged. Thank you for the contribution @stefanosala!
Looks like this commit has introduced a regression by removing the 'protocol' property from connection parameters. If you don't have 'useSSL' set to true it defaults to 'ampq' even if you have 'port' set to '5671'
old
this.protocol = getOption(parameters, 'RABBIT_PROTOCOL') || getOption(parameters, 'protocol', 'amqp://');
new
this.protocol = getOption(parameters, 'RABBIT_PROTOCOL') || (useSSL ? 'amqps://' : 'amqp://');
As suggested by Cloudamqp support person,
foo-foo-mq
should correctly auto-resolve the ssl port to5671
instead of the standard5672
. This replicate the same behavior as amqplib: https://github.com/squaremo/amqp.node/blob/e3e10167d3f498f632a5a50dc7fac62b314400c8/lib/connect.js#L109