correlationSource
constcorrelationSource:object
Defined in: correlation.store.ts:28
The correlation id as a context source, for createPipeline({ sources })
of @cqrs-ddd/pipeline and the job context registration of
@cqrs-ddd/pipeline-job-context. Unlike getCorrelationId, current()
generates nothing: it returns undefined when no id is set, so a pipeline
generates one and runs with it, and getCorrelationId inside the
handler returns that id. run(id, fn) runs fn with id, or with no id when id
is not printable ASCII without surrounding spaces. create() makes a new id, the one
way this package, pipelines and jobs generate one. accepts(id) tells whether an id
received from outside, such as in a job payload, passes the rules
configureCorrelation sets: by default at most 128 characters matching
DEFAULT_CORRELATION_ID_PATTERN. It reports nothing to onRejected.
Type Declaration
Section titled “Type Declaration”accepts
Section titled “accepts”
readonlyaccepts: (id) =>boolean
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
create
Section titled “create”
readonlycreate: () =>string
Returns
Section titled “Returns”string
current
Section titled “current”
readonlycurrent: () =>string|undefined
Returns
Section titled “Returns”string | undefined
readonlyrun: <T>(value,fn) =>T
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”string | undefined
() => T
Returns
Section titled “Returns”T