Skip to content
PACKAGES

cqrsMessageCommand()

Creates a CQRS message command.

import { cqrsMessageCommand } from "@graphrefly/ts/cqrs/messaging";
function cqrsMessageCommand(
message: MessageBusMessage<TPayload>,
delivery: MessageBusDelivery,
policy?: CqrsMessagingPolicy<TPayload, TCommand>,
): CqrsCommand<TCommand> | undefined
ParameterTypeDescription
messageMessageBusMessage<TPayload>message value used by the helper.
deliveryMessageBusDeliverydelivery value used by the helper.
policyCqrsMessagingPolicy<TPayload, TCommand>Policy object used to admit, retry, or route work.

The CQRS message command result.

import { cqrsMessageCommand } from "@graphrefly/ts/cqrs/messaging";

packages/ts/src/cqrs/messaging.ts