Skip to content

Commit

Permalink
fix: templates
Browse files Browse the repository at this point in the history
  • Loading branch information
tioffs committed Feb 4, 2022
1 parent 578be5a commit d3de1fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions handler.kafka.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ func (r *{{.ModelNamePrivate}}Publisher) Publish(event *{{.ModelName}}Event) err
}

msg := message.NewMessage(event.ID.String(), payload)

if event.Meta == nil {
event.Meta = map[string]string{}
}

msg.Metadata = event.Meta

if err = r.mp.Publish(r.topic, msg); err != nil {
Expand Down

0 comments on commit d3de1fd

Please sign in to comment.