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
#cloud #devops
- 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…
#cloud #devops
the docs are up at https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-dlq.html
#cloud #devops
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
#cloud #devops
when that happens, EventBridge can drop the event to a DLQ
- you can send them to the DLQ directly on 1st fail too
#cloud #devops
…use Lambda
more at https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-dlq.html#eb-dlq-resend
#cloud #devops
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
#cloud #devops
once events are in the archive, you can use the replay feature to…um…replay them
docs at https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-replay-archived-event.html
#cloud #devops
…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
#cloud #devops
making sure that your design can deal with those unhandled events effectively is critical to a reslient design
#cloud #devops
honestly, I had no idea that the archive feature existed in EventBridge. glad i stumbled across it today!
/ #cloud #devops