reactor / reactor-rabbitmq

Reactor RabbitMQ
Apache License 2.0
157 stars 55 forks source link

Consider adding an option to Sender.send to reuse the channel #163

Open a701440 opened 3 years ago

a701440 commented 3 years ago

Currently Sender.send creates a new channel and closes the channel at the end.

When sending multiple messages this can be worked around by implementing a publisher and pushing new send operations into the publisher, etc. It's a bit awkward for simple uses cases.

I would look at the possibility to use and existing Sender channel (Mono) and not closing it.

I know there is also an option of setting the channelCloseHandler.

Also there seems to be a discrepancy where send operations use the channelCloseHandler, but operations like declareQueue do not use it.