KubeMQ
IntegrationsNestJSReference

KubeMQCqrsOptions

Full field reference for KubeMQCqrsModule.forRoot() options that route NestJS CQRS commands, queries, and events through KubeMQ.

Every field accepted by KubeMQCqrsModule.forRoot() when wiring up the CQRS bridge.

Configuration Options

KubeMQCqrsModule.forRoot() accepts KubeMQCqrsOptions. All fields are optional and have sensible defaults.

ParameterTypeDefaultDescription
commandChannelPrefixstring'cqrs.commands'Channel prefix for commands; the full channel is {prefix}.{CommandName}.
queryChannelPrefixstring'cqrs.queries'Channel prefix for queries.
eventChannelPrefixstring'cqrs.events'Channel prefix for events.
persistEventsbooleanfalsePublish events to the durable Events Store (sendEventStore) instead of fire-and-forget Events (sendEvent).
commandTimeoutnumber10Command request-reply timeout (seconds).
queryTimeoutnumber10Query request-reply timeout (seconds).
drainTimeoutSecondsnumber5Time to drain in-flight messages when the module is destroyed (seconds).
channelResolver(message: object) => stringmessage.constructor.nameMaps a message instance to its channel segment (the part after the prefix).
serializerKubeMQSerializerJsonSerializerOutbound message serializer.
deserializerKubeMQDeserializerJsonDeserializerInbound response deserializer.

For async configuration (for example, pulling prefixes from ConfigService), use KubeMQCqrsModule.forRootAsync({ imports, useFactory, inject }), which returns the same providers via a factory.

Was this page helpful?

On this page