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

added debug logging for received nack/ack messages

This commit is contained in:
postmannen 2023-01-06 08:32:42 +01:00
parent f33b38e136
commit f574d768cd

View file

@ -560,7 +560,8 @@ func (p process) messageSubscriberHandler(natsConn *nats.Conn, thisNode string,
// Check for ACK type Event.
case message.ACKTimeout >= 1:
fmt.Println("-------------------- subscriberHandler ACK-----------------------")
er := fmt.Errorf("subscriberHandler: received ACK message: %v, from: %v, id:%v", message.Method, message.FromNode, message.ID)
p.errorKernel.logConsoleOnlyIfDebug(er, p.configuration)
// When spawning sub processes we can directly assign handlers to the process upon
// creation. We here check if a handler is already assigned, and if it is nil, we
// lookup and find the correct handler to use if available.
@ -584,7 +585,8 @@ func (p process) messageSubscriberHandler(natsConn *nats.Conn, thisNode string,
natsConn.Publish(msg.Reply, []byte{})
case message.ACKTimeout < 1:
fmt.Println("-------------------- subscriberHandler NACK-----------------------")
er := fmt.Errorf("subscriberHandler: received NACK message: %v, from: %v, id:%v", message.Method, message.FromNode, message.ID)
p.errorKernel.logConsoleOnlyIfDebug(er, p.configuration)
// When spawning sub processes we can directly assign handlers to the process upon
// creation. We here check if a handler is already assigned, and if it is nil, we
// lookup and find the correct handler to use if available.