Hermes PostgreSQL
    Preparing search index...

    Type Alias PublishOptions

    Options for publishing messages to the outbox.

    // Queue message in same transaction as business logic
    await sql.begin(async (sql) => {
    await storePatient(patient, sql)
    await outbox.queue(event, { tx: sql }) // Atomic operation
    })

    // Queue message with custom partition key (for horizontal scaling)
    await outbox.queue(event, { partitionKey: 'tenant-123' })
    type PublishOptions = {
        partitionKey?: string;
        tx?: TransactionSql;
    }
    Index

    Properties

    Properties

    partitionKey?: string

    Optional partition key for horizontal scaling. Messages with the same partition key are processed by the same consumer.

    tx?: TransactionSql

    Optional transaction to include the message in. When provided, the message is only committed if the transaction succeeds.