From 8898b42bdaa2a61cadf61bb3f01e8df67fd1ae35 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Thu, 12 Jan 2017 20:21:49 +0000 Subject: [PATCH] use msg.Subject as topic --- nats.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nats.go b/nats.go index 2e4d0fa..206da67 100644 --- a/nats.go +++ b/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