RabbitMQ publish doesn't take advantage of amqp-connection-manager's reliable publish
ttshivers opened this issue · comments
The rabbitmq package's publish
implementation calls publish
on a raw ConfirmChannel
instead of the ChannelWrapper
provided by amqp-connection-manager
.
Since it's not using the ChannelWrapper
, it's missing out on all the reliability features that amqp-connection-manager
provides for publishing messages.
Was this an intentional decision to not use the ChannelWrapper
?
nestjs/packages/rabbitmq/src/amqp/connection.ts
Lines 612 to 627 in 1891b32
Instead of using this._channel
there, this._managedChannel
could be used instead which is the ChannelWrapper
@ttshivers If you feel confident about this change and can provide test coverage to assert that it works as intended I'll be happy to review and merge.
I don't know what the reason was behind not to use ChannelWrapper
but from your explanation it seems logical to use so