Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

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

Discover how Microservices are a type of software architecture where large applications are made up of small, self-contained units working together through APIs that are not dependent on a specific language. Brought to you in partnership with AppDynamics.

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.

Discover the six challenges and best practices in managing microservice performance, brought to you in partnership with AppDynamics.

Topics:
java ,jms ,jvm ,integration

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}