Skip to content

Commit

Permalink
proper handling of EnableMessageOrdering where a new topic is created
Browse files Browse the repository at this point in the history
  • Loading branch information
roblaszczak committed Apr 18, 2023
1 parent 8bfa935 commit 090171e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/googlecloud/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ func (p *Publisher) Publish(topic string, messages ...*message.Message) error {
if err != nil {
return err
}
t.EnableMessageOrdering = p.config.EnableMessageOrdering

logFields := make(watermill.LogFields, 2)
logFields["topic"] = topic
Expand Down Expand Up @@ -212,7 +213,6 @@ func (p *Publisher) topic(ctx context.Context, topic string) (t *pubsub.Topic, e
}()

t = p.client.Topic(topic)
t.EnableMessageOrdering = p.config.EnableMessageOrdering

// todo: theoretically, one could want different publish settings per topic, which is supported by the client lib
// different instances of publisher may be used then
Expand Down

0 comments on commit 090171e

Please sign in to comment.