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
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 2/11 👇 Next tweet 👆 Start
- 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
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 3/11 👇 Next tweet 👆 Start
the docs are up at https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-dlq.html
🧵 #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 4/11 👇 Next tweet 👆 Start
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
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 5/11 👇 Next tweet 👆 Start
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
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 6/11 👇 Next tweet 👆 Start
…use Lambda
more at https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-dlq.html#eb-dlq-resend
🧵 #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 7/11 👇 Next tweet 👆 Start
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
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 8/11 👇 Next tweet 👆 Start
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
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 9/11 👇 Next tweet 👆 Start
…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
@marknca tweeted at 09-Feb-2022, 00:40
Tweet 10/11 👇 Next tweet 👆 Start
making sure that your design can deal with those unhandled events effectively is critical to a reslient design
🧵 #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40
honestly, I had no idea that the archive feature existed in EventBridge. glad i stumbled across it today!
/🧵 #cloud #devops
@marknca tweeted at 09-Feb-2022, 00:40