Since amqp091.NotifyPublish tag is an incremental id that is bound to the amqp091.Channel, we cannot identify which message we receive a publish notification for after an automatic reconnect (since the tag is silently reset to 0).
This is an issue linked to how amqp091 secretly handles this id.
If possible, it would be better for this lib to associate the amqp091.Channel tag to a unique rabbitmq.Publisher tag (that is incremented each time we publish without error). That would remove the impact of re-connection, so the original behavior is kept.
Possible solution:
have an increment int in channelManager that is incremented on every successful publish when NotifyPublish is on
have a startIncrement int in channelManager that is equal to to the increment+startIncrement of the previous channel in case of re-connection.
when transmitting a NotifyPublish confirmation, add the startIncrement to the tag provided by amqp091.Channel's Confirmation.
This should ensure the original behaviour is kept even with reconnection.
Since amqp091.NotifyPublish tag is an incremental id that is bound to the amqp091.Channel, we cannot identify which message we receive a publish notification for after an automatic reconnect (since the tag is silently reset to 0). This is an issue linked to how amqp091 secretly handles this id.
If possible, it would be better for this lib to associate the amqp091.Channel tag to a unique rabbitmq.Publisher tag (that is incremented each time we publish without error). That would remove the impact of re-connection, so the original behavior is kept.
Possible solution:
This should ensure the original behaviour is kept even with reconnection.