Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #113 from Azure/issue-111
Browse files Browse the repository at this point in the history
update to amqp 0.12.0 which uses strict settlement mode, bump version
  • Loading branch information
devigned committed Mar 25, 2019
2 parents c0123ef + fd0aa28 commit ca4ff1d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Expand Up @@ -2,6 +2,10 @@

## `head`

## `v0.4.0`
- Update to AMQP 0.12.0 which introduces strict settlement mode
([#111](https://github.com/Azure/azure-service-bus-go/issues/111))

## `v0.3.0`
- Add disposition batching
- Add NotFound errors for mgmt API
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Expand Up @@ -15,6 +15,6 @@ require (
github.com/uber/jaeger-lib v1.5.0 // indirect
go.opencensus.io v0.15.0
go.uber.org/atomic v1.3.2 // indirect
golang.org/x/net v0.0.0-20190311183353-d8887717615a // indirect
pack.ag/amqp v0.10.2
golang.org/x/net v0.0.0-20190322120337-addf6b3196f6 // indirect
pack.ag/amqp v0.11.0
)
8 changes: 4 additions & 4 deletions go.sum
Expand Up @@ -43,11 +43,11 @@ golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnf
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519 h1:x6rhz8Y9CjbgQkccRGmELH6K+LJj7tOoh3XWeC1yaQM=
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190322120337-addf6b3196f6 h1:78jEq2G3J16aXneH23HSnTQQTCwMHoyO8VEiUH+bpPM=
golang.org/x/net v0.0.0-20190322120337-addf6b3196f6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
pack.ag/amqp v0.8.0 h1:JT0f88Hsbo5D+s8bBdleDOHvMDoYcaBW6GplAUqtxC4=
pack.ag/amqp v0.8.0/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4=
pack.ag/amqp v0.10.2 h1:tOg29Eqx2kmgcDJa7OAjH9N3jqGA1gHf5iIAnBMsa5U=
pack.ag/amqp v0.10.2/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4=
pack.ag/amqp v0.11.0 h1:ot/IA0enDkt4/c8xfbCO7AZzjM4bHys/UffnFmnHUnU=
pack.ag/amqp v0.11.0/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4=
2 changes: 1 addition & 1 deletion namespace.go
Expand Up @@ -45,7 +45,7 @@ const (
//`

// Version is the semantic version number
Version = "0.3.0"
Version = "0.4.0"

rootUserAgent = "/golang-service-bus"
)
Expand Down
7 changes: 4 additions & 3 deletions receiver.go
Expand Up @@ -340,19 +340,20 @@ func (r *Receiver) newSessionAndLink(ctx context.Context) error {
}

receiveMode := amqp.ModeSecond
sendMode := amqp.ModeUnsettled
if r.mode == ReceiveAndDeleteMode {
receiveMode = amqp.ModeFirst
sendMode = amqp.ModeSettled
}

opts := []amqp.LinkOption{
amqp.LinkSourceAddress(r.entityPath),
amqp.LinkSenderSettle(sendMode),
amqp.LinkReceiverSettle(receiveMode),
amqp.LinkCredit(r.prefetch),
}

if r.mode == ReceiveAndDeleteMode {
opts = append(opts, amqp.LinkSenderSettle(amqp.ModeSettled))
}

if r.useSessions {
const name = "com.microsoft:session-filter"
const code = uint64(0x00000137000000C)
Expand Down
3 changes: 1 addition & 2 deletions sender.go
Expand Up @@ -240,8 +240,7 @@ func (s *Sender) newSessionAndLink(ctx context.Context) error {

amqpSender, err := amqpSession.NewSender(
amqp.LinkReceiverSettle(amqp.ModeSecond),
amqp.LinkTargetAddress(s.getAddress()),
amqp.LinkSenderSettle(amqp.ModeMixed))
amqp.LinkTargetAddress(s.getAddress()))
if err != nil {
log.For(ctx).Error(err)
return err
Expand Down

0 comments on commit ca4ff1d

Please sign in to comment.