When to use it
- The host already uses
Microsoft.Data.SqlClientand does not want aDbContext. - You need
rowversionCAS onMcpTasksunder your own migrations.
DbContext. Service Broker and Query Notifications are heavy; scale-out elicitation pairs Azure SQL with Service Bus as IMcpTaskInputSignalBus.
Intended how-to
- Add
McpEssentials.SqlServer. - Create
McpTaskswithrowversionfor compare-and-swap, indexes onOwnerUserIdandDiscardAfter. - Register the store as a singleton with the same current-user factory as Authenticated tasks.
- Optional: register a signal bus for multi-node
ElicitAsync.
TTL
CallSweepExpiredAsync from a hosted service, or DELETE WHERE DiscardAfter <= SYSUTCDATETIME(). DiscardAfter is CreatedAt + 2×TimeToLive, stamped at write.
See Stores.