Μετάβαση στο περιεχόμενο

correlationSource

Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.

const correlationSource: 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.

readonly accepts: (id) => boolean

string

boolean

readonly create: () => string

string

readonly current: () => string | undefined

string | undefined

readonly run: <T>(value, fn) => T

T

string | undefined

() => T

T

createPipeline({ sources: { correlationId: correlationSource } });