diff --git a/process.go b/process.go index d6144ef..36beef6 100644 --- a/process.go +++ b/process.go @@ -286,6 +286,9 @@ func (p process) messageDeliverNats(natsMsgPayload []byte, natsMsgHeader nats.He Header: natsMsgHeader, } + er := fmt.Errorf("info: preparing to send nats message with subject %v ", msg.Subject) + p.errorKernel.logConsoleOnlyIfDebug(er, p.configuration) + // If it is a NACK message we just deliver the message and return // here so we don't create a ACK message and then stop waiting for it. if p.subject.Event == EventNACK { @@ -297,6 +300,9 @@ func (p process) messageDeliverNats(natsMsgPayload []byte, natsMsgHeader nats.He } p.metrics.promNatsDeliveredTotal.Inc() + er := fmt.Errorf("info: sent nats message with subject %v ", msg.Subject) + p.errorKernel.logConsoleOnlyIfDebug(er, p.configuration) + //err = natsConn.Flush() //if err != nil { // er := fmt.Errorf("error: nats publish flush failed: %v", err) @@ -430,6 +436,9 @@ func (p process) messageDeliverNats(natsMsgPayload []byte, natsMsgHeader nats.He // Message were delivered successfully. p.metrics.promNatsDeliveredTotal.Inc() + er = fmt.Errorf("info: sent nats message with subject %v ", msg.Subject) + p.errorKernel.logConsoleOnlyIfDebug(er, p.configuration) + return } }