Skip to content

Commit 01bf051

Browse files
authored
feat(pubsub/pstest): add Message.Topic field and populate on publish (#10510)
1 parent a187451 commit 01bf051

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pubsub/pstest/fake.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ type Message struct {
246246
Acks int // number of acks received from clients
247247
Modacks []Modack // modacks received by server for this message
248248
OrderingKey string
249+
Topic string
249250

250251
// protected by server mutex
251252
deliveries int
@@ -828,6 +829,7 @@ func (s *GServer) Publish(_ context.Context, req *pb.PublishRequest) (*pb.Publis
828829
Attributes: pm.Attributes,
829830
PublishTime: pubTime,
830831
OrderingKey: pm.OrderingKey,
832+
Topic: req.Topic,
831833
}
832834
top.publish(pm, m)
833835
ids = append(ids, id)

0 commit comments

Comments
 (0)