Polling publisher

Context

You have applied the [[Transactional Outbox]] pattern.

Problem

How to publish messages/events into the outbox in the database to the message broker?

Forces

Solution

Publish messages by polling the database's outbox table.

Examples

Eventuate Tram frameworkarrow-up-right implements polling.

Resulting context

This pattern has the following benefits:

  • Works with any SQL database

This pattern has the following drawbacks:

  • Tricky to publish events in order

  • Not all NoSQL databases support this pattern

  • The [[Transactional Outbox]] pattern creates the need for this pattern.

  • The [[Transaction log tailing]] pattern is an alternative solution

Learn more

Last updated