Azure / go-amqp

AMQP 1.0 client library for Go.
https://github.com/Azure/go-amqp
MIT License
110 stars 58 forks source link

Remove concept of "max credit" from Receivers #251

Closed jhendrixMSFT closed 1 year ago

jhendrixMSFT commented 1 year ago

This exposed an implementation detail of how Receivers worked. With the removal of the Message channel, this is no longer required and never really made sense anyways. The MaxCredit and ManualCredits options have been consolidated into a single Credit option. This is used to set the total credit for a Receiver in auto-flow mode, or to disable auto-flow. Disposition batching needed some slight refactoring. Now you can directly specify the batch size instead of it being tied to link credit. Received messages that are sender-settled now correctly count towards a Receiver's credit and must be settled to reclaim it.

Fixes