@message-queue-toolkit/core
Version:
Useful utilities, interfaces and base classes for message queue handling. Supports AMQP and SQS with a common abstraction on top currently
16 lines • 784 B
JavaScript
import { z } from 'zod/v4';
/**
* When the payload is too large to be sent in a single message, it is offloaded to a storage service and a pointer to the offloaded payload is sent instead.
* This schema represents the payload that is sent in place of the original payload.
*/
export const OFFLOADED_PAYLOAD_POINTER_PAYLOAD_SCHEMA = z
.object({
offloadedPayloadPointer: z.string().min(1),
offloadedPayloadSize: z.number().int().positive(),
})
// Pass-through allows to pass message ID, type, timestamp and message-deduplication-related fields that are using dynamic keys.
.passthrough();
export function isOffloadedPayloadPointerPayload(value) {
return value.offloadedPayloadPointer !== undefined;
}
//# sourceMappingURL=offloadedPayloadMessageSchemas.js.map