metadata: add default headers

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-07-23 12:03:18 +03:00
parent d357fb1e0d
commit 675e121049
6 changed files with 33 additions and 13 deletions

View File

@@ -78,7 +78,7 @@ func (t *tunBroker) BatchPublish(ctx context.Context, msgs []*broker.Message, op
var err error
for _, msg := range msgs {
topic, _ := msg.Header.Get("Micro-Topic")
topic, _ := msg.Header.Get(metadata.HeaderTopic)
c, ok := topicMap[topic]
if !ok {
c, err := t.tunnel.Dial(ctx, topic, tunnel.DialMode(tunnel.Multicast))