if this is a master-slave task distribution system, where tasks need to be processed by different cluster nodes, but one task can only be processed by one node, then something like  might be helpful. This is not JMS, however.
A couple of years ago, we once implemented a JMS API over JGroups, but left filtering out. Not too difficult, unless you want a complete 100% impl of JMS.
Ping me on IRC (#jgroups) if you want to discuss this interactively.
I've looked at your article "A Simple Clustered Task Distribution System" and it is the exact use case I'm trying to implement.
But I don't want the code to be bounded to specific JGroups implementation. I'd like to use the application server MDB mechanism and use annotations to subscribe to message. First, I was hoping to find JMS reference implementation based on JGroups but couldn't find one. I thought of implementing one but after diving into the code I realized it might be too much work especially when I need very limited JMS capabilities.
Then I understood that maybe I don't need JMS implementation to use MDB mechanism, just to implement a resource adapter but since I'm not familiar with it, I need to dive into it.
I'd like to discuss this issue but I've never used IRC so I'm not familiar with the details: what server to connect, how to search for group etc`.
I understand the need to be independent from a specific API such as JGroups.
You could define your own API which allows you to use either JGroups or JMS, and makes you independent from both. At the end of the day, there are only a few methods you need to use from JGroups, e.g. create, connect, send/receive, viewAccepted, disconnect, so this should be simple to abstract away.
The IRC chat room is #jgroups at irc.freenode.net.