Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the default credits for the RPC link to be more reasonable (1000) #54

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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