I wandered down to the hotel bar last night and bumped into Guillaume Nodet; we got chatting about the new support for JMS flows in ServiceMix 4. I've written about JMS / JCA flows in a previous blog entry, arguing that, if not correctly configured, they can lead to far too much distribution and a consequent impact on performance. Back then, I argued that using explicit JMS queues - through ActiveMQ or whatever JMS broker you want - can provide just as effective a mechanism for distribution, message persistence, reliability and location transparency.
The latest stuff in SMX4 introduces some new stuff that makes me feel a lot happier about the concept of implementing the NMR with a JMS flow. First, if you want a JBI endpoint to be clustered, you have to explicitly mark it as clustered. This I like, as it gives the developer/designer back control of where the distribution points are in a flow. Second, the JBI flow now uses a single distributed queue for clustering. Previously in ServiceMix 3 a seperate queue was created for each JBI endpoint using the JMS flow; the new approach means less queues and less threads required to support the JMS flow. Different JBI endpoints will listen off the "NMR" queue using optimized message selectors to ensure that messages get consumed by the correct target services. Third, you can now optimize the JBI messaging layer to omit the use of JBI DONE messages: so, if you're implementing a one-way interaction over the JMS flow, you don't end up having to deal with an DONE that you simply don't need. Finally, Guillaume has made a cleaner separation between the JMS flow and the underlying JMS transport. So, you can use ActiveMQ if you want, or, alternatively, plug in another JMS broker to handle your JBI traffic.
I'm looking forward to playing with this, and perhaps documenting these new features. One clear point is that if you've made use of JMS flows in your architecture for ServiceMix 3, then you'll have that same support in ServiceMix 4, with just a little tweaking of configuration.
Good work, Guillaume! And, thanks again for the sandwich!