Skip to content

Do not confirmSelect more than once per channel #1056

Closed
@sergio91pt

Description

@sergio91pt

Is your feature request related to a problem? Please describe.

Reactor's RabbitMQ sendWithTypedPublishConfirms() always invokes the confirmSelect() method of the underlying channel which causes a blocking RPC call.

This is especially detrimental to performance when sending a small amount of messages per Publisher/Flux, as the channel is put into confirm mode even if it already was (when using a channel pool).

Following RabbitMQ's best practices, confirms should be enabled once per channel. In fact, there's no API to disable confirms once enabled on a channel.

Describe the solution you'd like

ChannelN should keep track if confirmSelect() was successfully enabled, and if so, future invocations of this method return a Confirm.SelectOk without making a RPC call.

I can contribute a PR if there's interest in this solution 🙂

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions