Summary
getDefaultChannel() returns the same channel used for assertQueue / bindQueue / assertExchange AND for the public runMQ.publish() path. If a setup operation precondition-fails (e.g., a queue redeclare with mismatched args), RabbitMQ closes the channel — and that's also the channel publishes go through. Subsequent publishes silently fail or throw on a closed channel.
Where
src/core/RunMQ.ts:137-140 (initialize() uses defaultChannel for setup + holds it for publishes)
src/core/consumer/RunMQConsumerCreator.ts:94, 142 (assertQueues / bindQueues use defaultChannel)
src/core/clients/RabbitMQClientAdapter.ts:99-104 (getDefaultChannel)
Failure mode
Proposed fix
Acceptance criteria
Summary
getDefaultChannel()returns the same channel used forassertQueue/bindQueue/assertExchangeAND for the publicrunMQ.publish()path. If a setup operation precondition-fails (e.g., a queue redeclare with mismatched args), RabbitMQ closes the channel — and that's also the channel publishes go through. Subsequent publishes silently fail or throw on a closed channel.Where
src/core/RunMQ.ts:137-140(initialize()uses defaultChannel for setup + holds it for publishes)src/core/consumer/RunMQConsumerCreator.ts:94, 142(assertQueues/bindQueuesuse defaultChannel)src/core/clients/RabbitMQClientAdapter.ts:99-104(getDefaultChannel)Failure mode
runMQ.publish()now fail because they share that channel.Proposed fix
Acceptance criteria