Skip to content

Commit

Permalink
golang: bump github.com/rabbitmq/amqp091-go from 1.3.4 to 1.4.0 (#208)
Browse files Browse the repository at this point in the history
* golang: bump github.com/rabbitmq/amqp091-go from 1.3.4 to 1.4.0

Bumps [github.com/rabbitmq/amqp091-go](https://github.com/rabbitmq/amqp091-go) from 1.3.4 to 1.4.0.
- [Release notes](https://github.com/rabbitmq/amqp091-go/releases)
- [Commits](rabbitmq/amqp091-go@v1.3.4...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/rabbitmq/amqp091-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...
  • Loading branch information
dependabot[bot] authored Aug 18, 2022
1 parent 007181c commit 06d2c07
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/ory/dockertest/v3 v3.9.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.13.0
github.com/rabbitmq/amqp091-go v1.3.4
github.com/rabbitmq/amqp091-go v1.4.0
github.com/scim2/filter-parser/v2 v2.2.0
github.com/spf13/cobra v1.5.0
go.uber.org/automaxprocs v1.5.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -953,8 +953,8 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo=
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rabbitmq/amqp091-go v1.3.4 h1:tXuIslN1nhDqs2t6Jrz3BAoqvt4qIZzxvdbdcxWtHYU=
github.com/rabbitmq/amqp091-go v1.3.4/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM=
github.com/rabbitmq/amqp091-go v1.4.0 h1:T2G+J9W9OY4p64Di23J6yH7tOkMocgnESvYeBjuG9cY=
github.com/rabbitmq/amqp091-go v1.4.0/go.mod h1:JsV0ofX5f1nwOGafb8L5rBItt9GyhfQfcJj+oyz0dGg=
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ=
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
Expand Down
1 change: 1 addition & 0 deletions pkg/eventsourcing/messaging/bus_rabbitmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func (b *rabbitEventBus) PublishEvent(ctx context.Context, event evs.Event) erro
}

err = b.publisher.Publish(
ctx,
rabbitMessageBytes,
[]string{b.generateRoutingKey(event)},
rabbitmq.WithPublishOptionsContentType("application/json"),
Expand Down
4 changes: 3 additions & 1 deletion pkg/rabbitmq/consume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
package rabbitmq

import (
"context"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
amqp "github.com/rabbitmq/amqp091-go"
Expand Down Expand Up @@ -50,7 +52,7 @@ var _ = Describe("Pkg/Rabbitmq/Consume", func() {
Expect(err).ToNot(HaveOccurred())
defer consumer.StopConsuming(expectedConsumerName, false)

err = publisher.Publish([]byte("test"), []string{expectedRoutingKey}, WithPublishOptionsExchange(expectedExchangeName))
err = publisher.Publish(context.Background(), []byte("test"), []string{expectedRoutingKey}, WithPublishOptionsExchange(expectedExchangeName))
Expect(err).ToNot(HaveOccurred())

Eventually(done, 60).Should(BeClosed())
Expand Down
4 changes: 3 additions & 1 deletion pkg/rabbitmq/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package rabbitmq

import (
"context"
"fmt"
"sync"

Expand Down Expand Up @@ -150,6 +151,7 @@ func NewPublisher(url string, config *amqp.Config) (*Publisher, <-chan amqp.Retu

// Publish publishes the provided data to the given routing keys over the connection
func (publisher *Publisher) Publish(
ctx context.Context,
data []byte,
routingKeys []string,
optionFuncs ...func(*PublishOptions),
Expand Down Expand Up @@ -177,7 +179,7 @@ func (publisher *Publisher) Publish(
message.Expiration = options.Expiration

// Actual publish.
err := publisher.chManager.channel.Publish(
err := publisher.chManager.channel.PublishWithContext(ctx,
options.Exchange,
routingKey,
options.Mandatory,
Expand Down

0 comments on commit 06d2c07

Please sign in to comment.