CorrelationPolicy
Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.
Defined in: policy/correlation.policy.ts:32
The rules every incoming correlation id must pass, set with configureCorrelation.
Properties
Section titled “Properties”maxLength?
Section titled “maxLength?”
optionalmaxLength?:number
Defined in: policy/correlation.policy.ts:38
The longest incoming id accepted, in characters.
Default
Section titled “Default”onRejected?
Section titled “onRejected?”
optionalonRejected?: (rejection) =>void
Defined in: policy/correlation.policy.ts:53
Called once, synchronously, for each incoming id that is replaced. An error it throws is ignored, so a failing report never fails the work.
Parameters
Section titled “Parameters”rejection
Section titled “rejection”Returns
Section titled “Returns”void
validateIncoming?
Section titled “validateIncoming?”
optionalvalidateIncoming?: (correlationId) =>boolean
Defined in: policy/correlation.policy.ts:47
The application’s rule for incoming ids. It replaces the
DEFAULT_CORRELATION_ID_PATTERN test and sees only ids that pass the built-in
check and maxLength; returning false or throwing rejects the id. It must accept
the UUIDv7 ids correlationSource.create() makes, because the jobs a request
enqueues and the services it calls receive them.
Parameters
Section titled “Parameters”correlationId
Section titled “correlationId”string
Returns
Section titled “Returns”boolean