Skip to content

Make handling of publisher confirmations transparent to the user #1682

@lukebakken

Description

@lukebakken

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

Mentioned here.

cc @danielmarbach @bording @Tornhoof

Describe the solution you'd like

  • Creating a channel via CreateChannelAsync will allow enabling publisher confirmations for the channel, and will allow enabling tracking of confirmations. An options class will be used.
  • When confirmations and tracking are enabled, BasicPublishAsync calls will wait indefinitely for the response from the broker. Users may implement a timeout via the cancellationToken parameter. If a Nack or Return is sent to the client, a PublishException will be thrown.
  • There will be a maximum count of outstanding confirmations allowed (also configurable). When this maximum is reached, calls to BasicPublishAsync will block.
  • (optional) when the current count of outstanding confirmations starts to near the maximum, delays could be introduced in publish attempts to allow the broker to catch up.

Describe alternatives you've considered

Users will be allowed to disable automatic tracking and do it themselves via BasicAcksAsync and BasicNacksAsync

Additional context

#1676 (comment)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions