I'm designing a small platform based on a series of event-based micro-services. The persistence storage I'm targeting is (the managed) Amazon PostgreSQL (Amazon RDS for PostgreSQL) — although I can go with Amazon Aurora as well.
Basically I'm trying to avoid sending events programmatically within the system. Previously I've used Amazon SQS, Axon Framework, etc., to deliver the same functionality, but there were always issues within the application because of the inconsistencies between the database state and the underlying system publishing the messages. For instance, there were cases where database transactions succeeded, but failures happened on the producer of the events. Having multiple infrastructure pieces at that juncture, in my experience, makes the system more difficult to manage state.
Basically, if I can listen to some built-in stream that captures a time-ordered sequence of item-level modifications in the database I would accomplish the same and it would be more reliable. Problem is that I've been searching throughout the documentation but I can't find anything like it so far.
In the end,
Amazon DynamoDB Streamsdelivers something similar to what I'm looking for, but I can't seem to find this inAmazon RDS for PostgreSQLorAmazon Aurora.
I'm open as well to different solutions I haven't considered.
I'm aware of the Transactional Outbox pattern, but I'm trying to use it as a last resort.
Transactional Outboxexists. The reason I'm trying to use theTransactional Outboxas a last resort is because it would require a custom service polling a database table and processing the data. On the other hand, making use of theAWS"internals" is always more convenient and less error-prone — aLambafunction listening to a predefined stream is more simple, reliable, and scalable than a container continuously polling a data source.