Quick hack, account for nil header
This commit is contained in:
parent
8e61057bc9
commit
1d1b26c545
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user