Skip to content

Commit

Permalink
upgraded to newest amqp091 version
Browse files Browse the repository at this point in the history
  • Loading branch information
Danlock committed Oct 14, 2023
1 parent 6aa00d8 commit eb3d041
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ update-readme-badge:

# pkg.go.dev documentation is updated via go get
update-proxy-cache:
@GOPROXY=https://proxy.golang.org go get github.com/danlock/rmq
@GOPROXY=https://proxy.golang.org go get -u github.com/danlock/rmq

release:
@$(MAKE) deps
Expand Down
5 changes: 3 additions & 2 deletions consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@ func (c *Consumer) declareAndConsume(ctx context.Context, mqChan *amqp.Channel)
}
}

// TODO: https://github.com/rabbitmq/amqp091-go/pull/192 has merged a Channel.ConsumeWithContext, which should be used here instead when we can
deliveries, err := mqChan.Consume(
// https://github.com/rabbitmq/amqp091-go/pull/192 Channel.ConsumeWithContext doesn't hold up under scrutiny. The actual network call doesn't respect the passed in context.
deliveries, err := mqChan.ConsumeWithContext(
ctx,
c.config.Queue.Name,
c.config.Consume.Consumer,
c.config.Consume.AutoAck,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/danlock/rmq

go 1.21

require github.com/rabbitmq/amqp091-go v1.8.1
require github.com/rabbitmq/amqp091-go v1.9.0
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rabbitmq/amqp091-go v1.8.1 h1:RejT1SBUim5doqcL6s7iN6SBmsQqyTgXb1xMlH0h1hA=
github.com/rabbitmq/amqp091-go v1.8.1/go.mod h1:+jPrT9iY2eLjRaMSRHUhc3z14E/l85kv/f+6luSD3pc=
github.com/rabbitmq/amqp091-go v1.9.0 h1:qrQtyzB4H8BQgEuJwhmVQqVHB9O4+MNDJCCAcpc3Aoo=
github.com/rabbitmq/amqp091-go v1.9.0/go.mod h1:+jPrT9iY2eLjRaMSRHUhc3z14E/l85kv/f+6luSD3pc=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
Expand Down

0 comments on commit eb3d041

Please sign in to comment.