Prioritizing handling of messages


I have the following situation:

  • Data arrives in a stream and each chunk of data results in a command for Aggregate A or B.
  • They both create an Event, also of type A or B.
  • The events are picked up by seperate Saga’s for either A or B.
  • Each saga will issue a command. Command A and B end up the same processing group.
  • The processing group has a tracking event processor with 10 segments.

I need to prioritize in such a way that if there are commands of type A, they are processed first and all commands of type B are processed iff there are no commands of type A to process.

This seems promising:

But I have no idea how to use it and if it is even relevant. No examples or mentions in the docs.