0 Replies Latest reply on Apr 30, 2013 1:02 PM by Justin Bertram

    Problematic use case: Clustered, HA durable subscriptions with message grouping

    Justin Bertram Master

      I recently discovered a use-case that isn't working as anticipated.  Here's the setup:

      • Symmetric cluster with colocated backup
      • A JMS producer sending messages to topic "X" using a connection factory with <group-id>
      • A JMS consumer using a durable subscription on topic "X"

       

      Here's the problematic use-case:

      1. Consumer connects to one of the clustered nodes, creates a durable subscription on topic "X", and then waits for messages.
      2. Producer sends a message to topic "X" using a connection factory with <group-id>.
      3. Consumer recieves the grouped message.  Messages in this group are now "pinned" to this subscription because of the grouping functionality.
      4. Consumer disconnects.
      5. Kill the node where the consumer created the durable subscription.
      6. The colocated backup on the other node will activate.  It now owns the durable subscription.
      7. Consumer connects to the other cluster node, creates a durable subscription on topic "X", and then waits for messages.
      8. Producer sends a message just like before.
      9. Consumer does not receive this message because it is distributed to the durable subscription on the (formerly backup, but now active) colocated instance.

       

      As far as I can tell the key here is in step #3 - the messages are pinned to a particular durable subscription.  Then when fail-over happens that durable subscription is basically unreachable because there are no JMS connection factories which connect directly to the colocated backup instance.  Until the live server is restored there is no way to get those messages using the conventional JNDI JMS pattern.

       

      To be clear, if message grouping is not used then the message can be received, but there are other cases where order gets broken.

       

      Is this use-case something that we want to support?  If so, how can we do this?  If not, why not?