Interface: NackEvent
Payload of the server 'nack' event, emitted whenever the server responds with a
negative acknowledgement instead of AA on the auto-ACK path (the fail-safe commit
contract). This fires both when a commit-gated autoAck: 'AA' handler throws/rejects and
when the server downgrades a positive auto-ACK because the inbound could not be
correlated (NackReason).
PHI-safe by construction: carries only the connection ID, the resolved
acknowledgement code, and a static reason, never the payload, the inbound control ID,
or the thrown error's message (which may carry PHI). The object is Object.freeze()'d
before emission.
Example
server.on('nack', ({ connectionId, ackCode, reason }) => {
metrics.increment('mllp.nack', { code: ackCode, reason }); // e.g. reason='discarded-bytes'
});
Properties
ackCode
readonlyackCode:NegativeAckCode
The negative acknowledgement code sent to the peer (AE or AR).
connectionId
readonlyconnectionId:string
Connection that produced the negative acknowledgement.
reason
readonlyreason:NackReason
Why the negative acknowledgement was sent (PHI-free).