use msg.Subject as topic
This commit is contained in:
2
nats.go
2
nats.go
@@ -122,7 +122,7 @@ func (n *nbroker) Subscribe(topic string, handler broker.Handler, opts ...broker
|
||||
if err := n.opts.Codec.Unmarshal(msg.Data, &m); err != nil {
|
||||
return
|
||||
}
|
||||
handler(&publication{m: &m, t: topic})
|
||||
handler(&publication{m: &m, t: msg.Subject})
|
||||
}
|
||||
|
||||
var sub *nats.Subscription
|
||||
|
Reference in New Issue
Block a user