Making Sure Events Don’t Drop In The AWS Cloud
Event-driven architectures can be really powerful.
A critical aspect of these designs is properly handling the events that drive the solution. You want to make sure that your design gracefully handles events that can’t be processed when they are emitted.
There are a few patterns to do this. This Twitter thread looks at two methods to address this challenge using Amazon EventBridge.
there are two general paths to take here:
- make sure unhandled events can be replayed
- make sure that unhandled events can be resent
- there are use cases where resending unhandled events is the better path, it entirely depends on what the event is describing
let’s look at a two ways to implement this @awscloud…
the docs are up at https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-dlq.html
you don’t have to worry about that but it’s handy to know, because it does open up some possibilities
EventBridge DLQ can be used when EventBridge can’t fire a trigger for an event
when that happens, EventBridge can drop the event to a DLQ
- you can send them to the DLQ directly on 1st fail too
the 2nd pattern is to use EventBridge’s archive feature…yes, it has an archive feature
the docs are up at https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-archive.html
once events are in the archive, you can use the replay feature to…um…replay them
…but the archive is really interesting. the replay feature is good for series of events over a set timeframe. for some use cases, this is the way to go
making sure that your design can deal with those unhandled events effectively is critical to a reslient design
honestly, I had no idea that the archive feature existed in EventBridge. glad i stumbled across it today!
/ #cloud #devops