Skip to content

Commit

Permalink
feat(pubsub/pstest): add Message.Topic field and populate on publish (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
adzil authored Jul 8, 2024
1 parent a187451 commit 01bf051
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pubsub/pstest/fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ type Message struct {
Acks int // number of acks received from clients
Modacks []Modack // modacks received by server for this message
OrderingKey string
Topic string

// protected by server mutex
deliveries int
Expand Down Expand Up @@ -828,6 +829,7 @@ func (s *GServer) Publish(_ context.Context, req *pb.PublishRequest) (*pb.Publis
Attributes: pm.Attributes,
PublishTime: pubTime,
OrderingKey: pm.OrderingKey,
Topic: req.Topic,
}
top.publish(pm, m)
ids = append(ids, id)
Expand Down

0 comments on commit 01bf051

Please sign in to comment.