title: Content-based consumer priority in ActiveMQ
body: <p>I'm working with consumers that need to load heavy resources to handle messages' content. Messages in the same family require the same resources.</p>
  <p>I tried using message grouping to make sure messages in the same family are given to a consumer where the resources are already loaded. However I want the consumer have priority on messages in the same family, not exclusivity (loading resources takes time, treating messages takes even longer). For example, if consumers 1 and 2 are available then messages with ID <code>group1</code> should always be given to consumer 1 and messages with ID <code>group2</code> should always be given to consumer 2. If only consumer 2 is available, it should consume any message. That way, consumer 1 has priority on messages <code>group1</code>, but not exclusivity. Likewise consumer 2 has priority on messages <code>group2</code>, but not exclusivity.</p>
  <p>Is there a way for message grouping in AMQ to not give exclusivity to consumer ? Or a way for consumer priority to be set dynamically based on content?</p>
  <p>I'm using ActiveMQ 5.16.2, but I can switch to Artemis if that is preferable.</p>