Re: is it possible to partition event handling on a slow consumer scenario?

107 views
Skip to first unread message

Michael Barker

unread,
Nov 5, 2018, 1:29:18 AM11/5/18
to lmax-di...@googlegroups.com
You can, in this scenario I would have each handler assigned a ordinal 0 to n-1 for n handlers.  Then each message should contain a key that can be hashed to that ordinal value.  Each handler receives all messages, but only processes the ones whose hash matches their ordinal.  Messages that need to be processed sequentially should use the same key.

Mike.

On Wed, 24 Oct 2018 at 06:40, Jalal Jafari <sj.j...@gmail.com> wrote:
I have a scenario in an online order management system, on which I receive messages from an external resource, save them in a disruptor and handle them with a single consumer. However the consuming process is rather slow due to db calls and etc, making the whole message processing system to perform poorly. A solution could be paralellizing the event handling process by defining multiple consumers and balance the load among them. The only problem is that some messages have to be processed in order (for example messages of a customer or messages with the same ID). Will we be able to direct messages with a specified characteristic to the same consumer thread?

--
You received this message because you are subscribed to the Google Groups "Disruptor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lmax-disrupto...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages