Class ReserveOutboxMessages
Represents a data request to reserve outbox messages for processing in the Oracle database.
[NoTenantTerm(TenantConfinement.EstateWide, "the outbox drain is cross-tenant by design: one dispatcher serves every tenant, and each claimed row carries its own tenant_id so the processor can re-establish the owning tenant per message. Scoping this claim to a single tenant would stall delivery for every other tenant in the store")]
public sealed class ReserveOutboxMessages : DataRequest<IEnumerable<IOutboxMessage>>, IDataRequest<IDbConnection, IEnumerable<IOutboxMessage>>, IDataRequest
- Inheritance
-
ReserveOutboxMessages
- Implements
- Inherited Members
Remarks
This framework-owned request uses its fixed constructor-defined primitive input schema. Replacing a
known parameter value through Parameters is observed at execution; parameter DbType,
direction, size, templates and output callbacks are not an extensibility contract of this request.
Custom IDataRequest implementations retain their own execution behavior.
Constructors
ReserveOutboxMessages(string, int, int, string, int, CancellationToken)
Initializes a new instance of the ReserveOutboxMessages class.
public ReserveOutboxMessages(string dispatcherId, int batchSize, int reservationTimeout, string outboxTableName, int sqlTimeOutSeconds, CancellationToken cancellationToken)
Parameters
dispatcherIdstringThe unique identifier of the dispatcher reserving the messages.
batchSizeintThe maximum number of messages to reserve in this batch.
reservationTimeoutintThe reservation window, in SECONDS. A reserved message is not re-claimable by another dispatcher until this many seconds have elapsed.
outboxTableNamestringThe name of the outbox table.
sqlTimeOutSecondsintThe SQL command timeout in seconds.
cancellationTokenCancellationTokenThe cancellation token.
Remarks
The claim stamps dispatcher_id with a value unique to this call (the supplied dispatcher id
followed by a fresh GUID) and the select-back returns only the rows carrying that value, bounded to
batchSize. A reservation is therefore addressable by the exact claim; a request to
release a dispatcher's reservations matches the dispatcher-id prefix.