The message is considered unprocessed and not deleted from the Queue.The message is considered processed and deleted from the Queue, preventing other consumers from reading it.If the filter rejects an incoming message from SQS, one of two things could happen: This has implications for event filters between SQS-Queues and Lambda functions. Additionally consumers have no direct way of picking the messages they want to work on, they have to process whatever SQS gives them. Messages are usually only processed by one consumer in the pool of consumers, so in most cases it behaves like one-to-one messaging. That means one or more producers create messages that can be processed by one or more consumers. SQS on the other hand implements the producer-consumer pattern. That means it doesn’t matter to other clients if one of the clients isn’t interested in all the messages. It’s part of that paradigm that multiple parties can read the same datapoint from the stream. DynamoDB Streams and Kinesis both deal with streaming data. It’s an interesting question how the system responds to messages from SQS that don’t match the filter, because SQS is different from the other two event sources that support the filter. We can now offload the undifferentiated heavy lifting of event filtering to AWS at no additional cost. Previously all events from those sources would trigger Lambda and you had to filter in your own code, which added complexity and cost, because the function was invoked even for events it didn’t care about. They were introduced in late 2021 and allow you to filter events from SQS, Kinesis or DynamoDB before they trigger your Lambda function. We’ll get to that in a bit, but first, let’s take a step back and get a brief primer on Lambda Event Filters. He wanted to know what happens to SQS messages that don’t match the filters. During that talk, my colleague Sebastian Möhn asked an interesting question about the filters, which I’ll look into today. That was a follow-up to a talk I had given on the subject internally at tecRacer. In a recent post I wrote about Lambda Event Filters and their benefits.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |