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

correlationSource

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

const correlationSource: object

Defined in: correlation.store.ts:30

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. 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, is well formed: at most DEFAULT_CORRELATION_ID_MAX_LENGTH characters matching DEFAULT_CORRELATION_ID_PATTERN.

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 } });