Over a million developers have joined DZone.

High Performance JMS Publishing

DZone 's Guide to

High Performance JMS Publishing

Learn more about JMS restrictions and how to solve for these problems when building a middleware product.

· Integration Zone ·
Free Resource

I started with a problem, JMS send is synchronzied per connection(In the TIBCO EMS drivers). This extremely limits outbound throughput of JMS per JVM. If you're building a middleware product, this is an extremely important metric and needs to be tuned appropriately.

So you'd think the solution would be simple. Wire up the connection pooling connection factory from Spring? Doesn't exist... that I'm aware of.

ActiveMQ provides this implementation out of the box, but if you're not using ActiveMQ, and you're using Tibco, you're out of luck.

Now, heavyweight containers like weblogic will do this caching and pooling for you. As the industry moves away from this standard, we'll need to come up with a custom solution.

Our solution was to pool JmsTemplates(using apache commons pools) each with their own connections. Ideally you'd just pool connections, but that would require a custom JmsTemplate implementation, as when I injected a proxy object as a pool, it seemed to only wire that object up on the set and only ever use 1.

We decided against creating a growing and shrinking pool, and currently keep it to a static size. But we could implement these interfaces to gain that functionality.

java ,jms ,jvm ,integration

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}