mirror of
https://github.com/postmannen/ctrl.git
synced 2025-03-15 18:58:14 +00:00
added debug logging for received nack/ack messages
This commit is contained in:
parent
f33b38e136
commit
f574d768cd
1 changed files with 4 additions and 2 deletions
|
@ -560,7 +560,8 @@ func (p process) messageSubscriberHandler(natsConn *nats.Conn, thisNode string,
|
||||||
|
|
||||||
// Check for ACK type Event.
|
// Check for ACK type Event.
|
||||||
case message.ACKTimeout >= 1:
|
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
|
// 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
|
// 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.
|
// 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{})
|
natsConn.Publish(msg.Reply, []byte{})
|
||||||
|
|
||||||
case message.ACKTimeout < 1:
|
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
|
// 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
|
// 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.
|
// lookup and find the correct handler to use if available.
|
||||||
|
|
Loading…
Add table
Reference in a new issue