• This repository has been archived on 21/Jun/2022
  • Stars
    star
    201
  • Rank 193,293 (Top 4 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 13 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple DSL to make using the LMAX disruptor pattern simpler.

Disruptor Wizard

The disruptor wizard is a simple DSL to make setting up the LMAX Disruptor simpler. The LMAX disruptor itself is an extremely high performance, low latency method of passing data between producers and consumers in a lock-free manner. It was developed by LMAX as part of their financial trading platform.

Examples

A simple consumer chain where A must process events before B which must be before C which in turn must be before D.

DisruptorWizard dw = new DisruptorWizard(ENTRY_FACTORY, ringBufferSize, executor);
dw.consumeWith(A).then(B).then(C).then(D);

A diamond shape dependency where A and B process any event. C depends on A, D depends on B and E depends on all previous tasks.

dw.consumeWith(A, B);
dw.after(A).consumeWith(C);
dw.after(B).consumeWIth(D);
dw.after(C, D).consumeWith(E);