Quick hack, account for nil header

This commit is contained in:
Asim 2016-02-21 23:52:08 +00:00
parent 8e61057bc9
commit 1d1b26c545

View File

@ -332,6 +332,10 @@ func (h *httpBroker) Publish(topic string, msg *Message, opts ...PublishOption)
return err
}
if msg.Header == nil {
msg.Header = map[string]string{}
}
msg.Header[":topic"] = topic
b, err := json.Marshal(msg)
if err != nil {