Is there some component in Spring Integration that could be used to filter out duplicates in a specified time frame?
I am looking for something like Debounce from ReactiveX
In my project I am sending a Payload containing a UUID and I want to filter out multiple Payloads with the same UUID if the are sent through the queue within 10 seconds for example - then I want to only let the last on through as long as no other Payload with the same UUID comes within the next 10 seconds.
You can use an aggregator for that purpose. What you would need set up is
expire-groups-upon-completion to false, so that the group will not be deleted as soon as it is completed and sent outgroup-timeout to, for example, for 10 secondsexpire-groups-upon-timeout as true (it is so by default)From the reference documentation:
(expire-groups-upon-completion) When set to true (default false), completed groups are removed from the message store, allowing subsequent messages with the same correlation to form a new group. The default behavior is to send messages with the same correlation as a completed group to the discard-channel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With