@@ -0,0 +1,878 @@
+package won.matcher.service.common.mailbox;%0A%0Aimport com.typesafe.config.Config;%0A%0Aimport akka.actor.ActorSystem;%0Aimport akka.dispatch.PriorityGenerator;%0Aimport akka.dispatch.UnboundedStablePriorityMailbox;%0Aimport won.matcher.service.common.event.AtomEvent;%0A%0Apublic class PriorityAtomEventMailbox extends UnboundedStablePriorityMailbox %7B%0A    // needed for reflective instantiation%0A    public PriorityAtomEventMailbox(ActorSystem.Settings settings, Config config) %7B%0A        // Create a new PriorityGenerator, lower prio means more important%0A        super(new PriorityGenerator() %7B%0A            @Override%0A            public int gen(Object event) %7B%0A                if (event instanceof AtomEvent) %7B%0A                    return ((AtomEvent) event).getPriority().getPriority();%0A                %7D%0A                return AtomEvent.Priority.LOWEST_PRIORTY;%0A            %7D%0A        %7D);%0A    %7D%0A%7D

Add priority-aware mailbox for use by matchers