gojek/ziggurat

Move out oldest-processed-message functionality out into a middleware

theanirudhvyas opened this issue · 0 comments

In the current implementation (3.3.1), oldest-processed-message-in-s is a config that is used to configure how long back in time will a service written in Ziggurat process messages, so for example if we reset the offset to 7 days ago, but oldest-processed-message-in-s is set to 3 days (259200 s), it will skip the messages older than 3 days.
This implementation is tightly intertwined with streams logic and does not make sense to keep it in that domain.
When it was implemented we did not have the abstraction and support for middlewares, but now that we do, we can pull out that logic into a middleware.
This will be a better abstraction and can be easily configured by users.

To keep the implementation backward compatible, we can add a deprecation notice to the current implementation and add a middleware in Ziggurat for this.