Setu-TS
    Preparing search index...

    Interface PublishOptions

    Options accepted by IMessageBroker.publish.

    An option a broker has no native primitive for is carried as a transport header, never dropped and never refused, so portable producer code behaves the same on every broker and the option stays observable through MessageMetadata.headers.

    orderingKey decides placement — the same key reaches the same partition, retry queue or ordered subscription where the broker has one — and not the order handlers finish in. What a handler failure does to order differs per broker; a consumer that needs order compares the delivered envelope's version and drops or defers a stale message.

    Every value is validated on publish and refused by name when malformed; the refused value is never echoed back. A delivered x-setu-ordering-key or x-setu-deduplication-id header is a hint written by whoever published the message — validation runs on the publish side only — so a consumer may use it to order or de-duplicate its own work, never to authorize anything.

    0.9.0

    interface PublishOptions {
        deduplicationId?: string;
        headers?: Readonly<Record<string, string>>;
        orderingKey?: string;
    }
    Index
    deduplicationId?: string

    Id a broker uses to drop a duplicate re-send: NATS's Nats-Msg-Id, Service Bus's messageId, RabbitMQ's messageId, and DEDUPLICATION_ID_HEADER everywhere else. At most 128 UTF-8 bytes, no leading/trailing whitespace, no control characters. Derive it from a producer-assigned id — a caller-chosen value lets the caller suppress another message within the broker's de-duplication window.

    headers?: Readonly<Record<string, string>>

    Application headers written beside the framework's own. A name a transport or its server acts on (including traceparent, cc, bcc, payload, nats-* and x-setu-*) is refused on every broker, as is a goog prefix — a precaution: Pub/Sub's reservation of it is stated only by third-party documentation, and the emulator accepts it.

    orderingKey?: string

    Key that places the message: Kafka's message key, Pub/Sub's orderingKey, and ORDERING_KEY_HEADER everywhere else. At most 128 UTF-8 bytes, no leading/trailing whitespace, no control characters. Derive it from an aggregate the application owns — never from request input, which would let a caller concentrate load on one partition or ordering key, and, on a log-compacted Kafka topic, erase an earlier message carrying the same key.