Skip to content

Commit

Permalink
Change the default credits for the RPC link to be more reasonable (10…
Browse files Browse the repository at this point in the history
…00) (#54)

Use a higher link credit count by default for the rpc link (1000)
  • Loading branch information
richardpark-msft authored Sep 3, 2021
1 parent 75c6f57 commit 7e6517e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 5 additions & 3 deletions rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 7e6517e

Please sign in to comment.