1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00

removed subscribesync pub with NACK msgs

This commit is contained in:
postmannen 2021-12-30 17:03:42 +01:00
parent b8d21420ed
commit 31ce2e978c

View file

@ -215,6 +215,19 @@ func (p process) messageDeliverNats(natsMsgPayload []byte, natsMsgHeader nats.He
Header: natsMsgHeader,
}
//
if p.subject.CommandOrEvent == CommandNACK || p.subject.CommandOrEvent == EventNACK {
err := natsConn.PublishMsg(msg)
if err != nil {
er := fmt.Errorf("error: nats publish of hello failed: %v", err)
log.Printf("%v\n", er)
return
}
p.processes.metrics.promNatsDeliveredTotal.Inc()
return
}
// The SubscribeSync used in the subscriber, will get messages that
// are sent after it started subscribing.
//