Skip to content

Commit

Permalink
Implement the nfm_reply field in input
Browse files Browse the repository at this point in the history
  • Loading branch information
Robi9 committed Feb 1, 2024
1 parent 386ea31 commit b0bb75d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions core/tasks/handler/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,19 @@ func handleMsgEvent(ctx context.Context, rt *runtime.Runtime, event *MsgEvent) e
}
msgIn.SetOrder(order)
}
mdValue, ok = metadata["nfm_reply"]
if ok {
var nfmReply *flows.NFMReply
asJSON, err := json.Marshal(mdValue)
if err != nil {
log.WithError(err).Error("unable to marshal metadata from msg event")
}
err = json.Unmarshal(asJSON, &nfmReply)
if err != nil {
log.WithError(err).Error("unable to unmarshal orderJSON from metadata[\"nfm_reply\"]")
}
msgIn.SetNFMReply(nfmReply)
}
}

// build our hook to mark a flow message as handled
Expand Down

0 comments on commit b0bb75d

Please sign in to comment.