I'm facing the problem to implement the following feature under JBoss Messaging 1.4: In a cluster, all messages with a distinct property must be processed serially. I know that this feature is provided with HornetQ (Clustered Groups), but in it's current version, we cannot you HornetQ since it's failover is not yet good enough to use in production. So far I see these alternatives to get this done in JBoss Messaging 1.4:
1.) Use a DB Lock - if the lock for this property is already aquired by another consumer in the cluster, rollback or re-add the message to to queue again.
2.) Use some kind of distributed in-memory locking (e.g. Hazelcast) to do the same.
Does anyone see a different, more lightweight approach to coordinate all consumers in a cluster? It's important that none of the consumers are blocked and that the property values are created dynamically at runtime (so static message selection is not possible).