From 7e6517e7fef3a6d9157490f54bec0d81bdcb2018 Mon Sep 17 00:00:00 2001 From: Richard Park <51494936+richardpark-msft@users.noreply.github.com> Date: Fri, 3 Sep 2021 16:18:45 -0700 Subject: [PATCH] Change the default credits for the RPC link to be more reasonable (1000) (#54) Use a higher link credit count by default for the rpc link (1000) --- changelog.md | 4 ++++ rpc/rpc.go | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 5852437..0e2cccf 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # Change Log +## `v3.2.0` +- Change the default credits for the RPC link to be more reasonable (1000) + [PR#54](https://github.com/Azure/azure-amqp-common-go/pull/54) + ## `v3.1.2` - Fixing a potential race condition when an RPC link is shut down while still sending requests or handling responses. diff --git a/rpc/rpc.go b/rpc/rpc.go index a873e70..aa352b9 100644 --- a/rpc/rpc.go +++ b/rpc/rpc.go @@ -40,9 +40,10 @@ import ( ) const ( - replyPostfix = "-reply-to-" - statusCodeKey = "status-code" - descriptionKey = "status-description" + replyPostfix = "-reply-to-" + statusCodeKey = "status-code" + descriptionKey = "status-description" + defaultReceiverCredits = 1000 ) type ( @@ -148,6 +149,7 @@ func NewLinkWithSession(session *amqp.Session, address string, opts ...LinkOptio receiverOpts := []amqp.LinkOption{ amqp.LinkSourceAddress(address), amqp.LinkTargetAddress(link.clientAddress), + amqp.LinkCredit(defaultReceiverCredits), } if link.sessionID != nil {