Thanks for the info,
My needs are simpler than that:
Your case is not even a simple case of merging, because an update to be filtered would not necessarily be merged with the next one, but, based on the price, it could be merged with a more recent one, thus not preserving the order.
We'll think about the suggestion.
In fact yes, what I am looking for is for the update to be merged only with the next ones to provide a correct price execution order. For instance:
10:00:00.001, price=15.25, quantity=20
10:00:00.002, price=15.25, quantity=50
10:00:00.010, price=15.25, quantity=100
10:00:01.001, price=15.50, quantity=10
10:00:01.020, price=15.50, quantity=100
10:00:01.030, price=15.25, quantity=10
10:00:01.040, price=15.25, quantity=20
In this case, if this group is about to be discarded (usually it is much longer sequence where the drop happens), I would merge this way:
10:00:00.010, price=15.25, quantity=170
10:00:01.020, price=15.50, quantity=110
10:00:01.040, price=15.25, quantity=30
If the merged group is still too big to be delivered without drop, than that I can live with it. But this technique would solve most drop issues in reallity.
Regards,
A