Skip to content

SQL Server scripts to evaluate different approaches of an Outbox pattern

Notifications You must be signed in to change notification settings

Ventilios/sql-outbox

Repository files navigation

Outbox message queue examples

This repository has some sample scripts of leveraging an Outbox pattern with SQL Server. Can be used to find the right balance between concurrent read and write operations on the message box table.

  1. 1_clustered - Table with a primary key and clustered index on the pk.
  2. 2_clustered_optimizeseqkey - Table with a primary key and clustered index on the primary k with SQL Server 2019 feature optimize_for_sequential_key.
  3. 3_clustered_watermark - Table with a primary key and clustered index on the pk and using a watermark table to optimize pulling data from the table.
  4. 4_clustered_optimizeseqkey_watermark - Table with a primary key, clustered index on the primary key with SQL Server 2019 feature optimize_for_sequential_key and using a watermark table to optimize pulling data from the table.
  5. 5_partitioned_watermark - Table with a primary key on the identity, unique clustered index on id, hash and primary key on id with a non-clustered index (to support seeking on id).
  6. [TODO] 6_LMax_disruptor - Inspired by Chris Adkin: https://chrisadkin.io/2016/01/02/super-scaling-queues-using-the-lmax-disruptor-pattern/
  7. [TODO] 7_LMax_disruptor_inmemory - Inspired by Chris Adkin: https://chrisadkin.io/2016/01/18/super-scaling-queues-using-the-lmax-disruptor-pattern-and-the-in-memory-oltp-engine/

When evaluating a message box or queue pattern, the following articles and points can be used for inspiration:

About

SQL Server scripts to evaluate different approaches of an Outbox pattern

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages