672329 members! Sign up to stay informed.

Sponsored Links


Resources

Enterprise Java
Research Library

Get Java white papers, product information, case studies and webcasts

News News News Messages: 18 Messages: 18 Messages: 18 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

How to tune Apache ActiveMQ

Posted by: Joseph Ottinger on June 15, 2006 DIGG
LogicBlaze has published "How to tune Apache ActiveMQ," a document discussing factors that make ActiveMQ go faster (or give it other characteristics). It's a good idea, one that other products could use. The tips include choosing the right Quality of Service, tuning the streaming, avoiding message copying and unnecessary serialization, and others.

Oddly enough, ActiveMQ is still in the Apache incubator process, despite being fairly mature.

Threaded replies

·  How to tune Apache ActiveMQ by Joseph Ottinger on Thu Jun 15 10:59:44 EDT 2006
  ·  Apache Incubator by Guillaume Nodet on Thu Jun 15 12:31:07 EDT 2006
    ·  Apache Way by Jon Kofal on Thu Jun 15 17:21:15 EDT 2006
      ·  Re: Apache Way by Yanick Duchesne on Thu Jun 15 21:27:42 EDT 2006
  ·  Re: How to tune Apache ActiveMQ by Erik Onnen on Thu Jun 15 23:20:15 EDT 2006
    ·  Re: How to tune Apache ActiveMQ by James Strachan on Fri Jun 16 06:03:20 EDT 2006
    ·  ... and why not write your own VM and OS while you are at it... by Tatu Saloranta on Fri Jun 16 15:12:15 EDT 2006
    ·  The larger picture by Ed Peters on Mon Jun 19 08:50:09 EDT 2006
  ·  How to tune solutions for Business Process Integration ... by Roland Altenhoven on Sat Jun 17 04:05:49 EDT 2006
  ·  Any tutorial on Tomcat/ActiveMQ? by Yakov Fain on Sun Jun 18 07:48:56 EDT 2006
    ·  Re: Any tutorial on Tomcat/ActiveMQ? by Roland Altenhoven on Mon Jun 19 00:38:59 EDT 2006
      ·  Not bits and pieces by Yakov Fain on Mon Jun 19 09:37:34 EDT 2006
        ·  Re: Not bits and pieces by James Strachan on Mon Jun 19 12:55:27 EDT 2006
          ·  Re: Not bits and pieces by Yakov Fain on Tue Jun 20 06:44:47 EDT 2006
            ·  Re: Not bits and pieces by James Strachan on Tue Jun 20 06:57:10 EDT 2006
              ·  Re: Not bits and pieces by Roland Altenhoven on Tue Jun 20 09:01:57 EDT 2006
                ·  Re: Not bits and pieces by James Strachan on Tue Jun 20 10:53:23 EDT 2006
                  ·  Re: Not bits and pieces by Roland Altenhoven on Wed Jun 21 01:32:33 EDT 2006
        ·  Re: Not bits and pieces by Roland Altenhoven on Mon Jun 19 15:01:26 EDT 2006
  Message #211435 Post reply Post reply Post reply Go to top Go to top Go to top

Apache Incubator

Posted by: Guillaume Nodet on June 15, 2006 in response to Message #211427
Oddly enough, ActiveMQ is still in the Apache incubator process, despite being fairly mature.


The Apache Incubator (see http://incubator.apache.org/) primary purpose is to clear IP issues and to ensure the community is healthy and behave the "Apache Way", not about code maturity and quality.

  Message #211467 Post reply Post reply Post reply Go to top Go to top Go to top

Apache Way

Posted by: Jon Kofal on June 15, 2006 in response to Message #211435
The Apache Incubator... primary purpose is to clear IP issues and to ensure the community is healthy and behave the "Apache Way"


Must-Use-Commons-Logging

I couldn't resist that one, sorry.

  Message #211489 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Apache Way

Posted by: Yanick Duchesne on June 15, 2006 in response to Message #211467
Drop-in replacement...

"SLF4J suffers from none of the class loader problems or memory leaks observed with Jakarta Commons Logging"

http://www.slf4j.org/

  Message #211491 Post reply Post reply Post reply Go to top Go to top Go to top

Re: How to tune Apache ActiveMQ

Posted by: Erik Onnen on June 15, 2006 in response to Message #211427
I'd be curious to know if users consider these 'real' options relative to how they use JMS. I've used JMS for some time now and never in a situation where duplicate delivery was acceptable let alone any sort of potential message loss as is possible with async sends or without transactions.

I guess what I'm asking is, if you don't care about the ACID-ness of JMS, why not just use IP multicast and bypass the message broker all together? I'm not interested in "JMS gives you a consistent API" type answers or "multicast is sockets and therefore to hard" both of which can be hidden behind a simple abstraction layer allowing JMS or multicast. If you're interested in such optimizations, why not optimize it to the hilt and bypass JMS completely?

  Message #211506 Post reply Post reply Post reply Go to top Go to top Go to top

Re: How to tune Apache ActiveMQ

Posted by: James Strachan on June 16, 2006 in response to Message #211491
I'd be curious to know if users consider these 'real' options relative to how they use JMS


Thanks for the vote of confidence :). One of the first recommendations is to boost performance using JMS transactions and to batch more operations within a transaction to increase throughput. Pretty standard tuning advice to working with most transactional resources like JDBC or JMS. Most certainly 'real'.

I've used JMS for some time now and never in a situation where duplicate delivery was acceptable let alone any sort of potential message loss as is possible with async sends or without transactions.


Thats fine then, don't use those options :)

One of the things which makes messaging and SOA in general interesting is there is a massive number of different use cases, scenarios and requirements.

Whether its crazy high volume RFID or market data prices or distributed caching (where a duplicate or missed message is not the end of the world; others will come along later or you can always flush a cache or do some reconcilation to deal with failures) - or whether its more traditional MQSeries type of stuff where everything is transactional, persistent and often using XA to make sure you absolutely never ever loose a message - including sometimes requiring multiple copies of the message in different data centres to insure against catastrophic hardware failure.

The performance tuning guide is an attempt to discuss every possible way in which you can trade the various configuration options and quality of service constraints with performance. Clearly some of them will not apply to all use cases.

Like most things in IT, there are tradeoffs depending on what you need.




I guess what I'm asking is, if you don't care about the ACID-ness of JMS, why not just use IP multicast and bypass the message broker all together?


JMS providers can sit on top of multicast too BTW :)



I'm not interested in "JMS gives you a consistent API" type answers or "multicast is sockets and therefore to hard" both of which can be hidden behind a simple abstraction layer allowing JMS or multicast. If you're interested in such optimizations, why not optimize it to the hilt and bypass JMS completely?


It depends on what you need. Certainly as we've shown you can use a high performance open source messaging system based on JMS to go very fast and support a whole range of transports, topologies and reliability characteristics. e.g. if you need 20,000 messages/second for a single producer/consumer thread its easily possible with non-persistent topics.

But by all means write multicast code if thats what you'd rather do; noone's forcing you to use JMS if you have some aversion to standard APIs.

James
LogicBlaze
Fuse: Open Source SOA

  Message #211579 Post reply Post reply Post reply Go to top Go to top Go to top

... and why not write your own VM and OS while you are at it...

Posted by: Tatu Saloranta on June 16, 2006 in response to Message #211491
... I guess what I'm asking is, if you don't care about the ACID-ness of JMS, why not just use IP multicast and bypass the message broker all together?



There can be lots of reasons, like wanting to retain the future possibility of wanting ACID features, and the fact that multicast doesn't really work/scale nicely outside of LANs. The resulting system with an external queuing component will also be more flexible, easier to move pieces around, change topology.
And finally, it is non-trivial amount of time one uses for writing messaging systems from scratch. JMS implementations save time, and good ones offer performance one can't trivially exceed with modest amount of work. So one could as well ask why on earth would you want to write your own, unless you have a very specific need? Even if you just got a typical multicast implementation with typical characteristics, you have probably saved lots of time.

  Message #211598 Post reply Post reply Post reply Go to top Go to top Go to top

How to tune solutions for Business Process Integration ...

Posted by: Roland Altenhoven on June 17, 2006 in response to Message #211427
In my personal experience is Apache ActiveMQ a good and stable solution which provides high performance messaging and is darkly integrated in ServiceMix - one of the ESB Solutions from Apache with functionally support for the JBI-Standard (Java Business Integration ).

I think too: The performance criterions are a very important case in the areas of SOA and Enterprise Messaging.

Some people has experienced, that a few of products destinated to Business Process Integration areas (... maybe with prices located in the higher regions...), has sometimes a little bit of trouble, to provide the necessary performance when the message interchange is based on high traffic and high volume.

Good, maybe this problem can be solved with some tuning measures (when the generic product structure allows this way...), extented hardware-solutions, clustering or some other special tricks - but in some cases this measures are unfortunately not satisfactory and maybe, so this products are not usable in this destinated projects.

Finally, i think that products which provides - among the other important things - basically a high performance based structure and permits furthermore extended tuning capabilities, are principally the right solution for the difficult missions in the SOA and Enterprise Messaging areas.

Roland



---
SOA Kompetenznetzwerk
Information & Collaboration-Portal for SOA & ESA in German Language

http://soa-competence-network.de
http://esa-competence-network.de

  Message #211614 Post reply Post reply Post reply Go to top Go to top Go to top

Any tutorial on Tomcat/ActiveMQ?

Posted by: Yakov Fain on June 18, 2006 in response to Message #211427
Before even trying to fine tune ActiveMQ, I guess, one would need to configure Tomcat with Active MQ :)

I wonder if anyone can point me to a step-by-step tutorial showing how to configure a Tomcat Web Server with Active MQ .
Google returns bits and pieces of the relevant info...

I've heard that ActiveMQ may be the best open source messaging solution, and using it with a super popular Tomcat Web server seems like a no-brainer to me. But where is the doc?

Thanks,
Yakov Fain

  Message #211634 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Any tutorial on Tomcat/ActiveMQ?

Posted by: Roland Altenhoven on June 19, 2006 in response to Message #211614
The following Tomcat instructions are not a step-by-step tutorial for beginners. But I think, really interesting people can found many helpful informations by a look to the extended document-site of ActiveMQ and their associated mailing-lists.

http://www.activemq.com
http://www.activemq.com/site/tomcat.html

  Message #211671 Post reply Post reply Post reply Go to top Go to top Go to top

The larger picture

Posted by: Ed Peters on June 19, 2006 in response to Message #211491
(Sorry in advance if my response isn't snippy enough.)

Even if out-of-order, duplicate, and nonguaranteed delivery aren't your cup of tea, you can still take advantage of messaging optimizations like this if your app has enough persistent state. You would write your own error detection/correction logic, which is still probably going to involve less code than writing a custom messaging implementation. So in essence you're telling the JMS provider, "just go fast, and I'll pick up the pieces".

  Message #211676 Post reply Post reply Post reply Go to top Go to top Go to top

Not bits and pieces

Posted by: Yakov Fain on June 19, 2006 in response to Message #211634
I guess, this is the difference between the open source and professional products. The OS vendors assume that experienced developers will eventually figure it out, which is true if your project really depends on this software.

My case is different. I'm writing a chapter for a book on integration Java with some third-party software by using messaging. Hence, I decided to take a couple of popular open source products such as ActiveMQ and Tomcat. After spending an hour unsuccessfully trying to make them talk to each other, I'm considering picking up another messaging tool for my sample application. I'm sure, if I'd spent a bit more time, I'd figure it out... But I'd rather spend my time doing something more creative than fighting with configuring queues, topics ports and jars.

  Message #211701 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Not bits and pieces

Posted by: James Strachan on June 19, 2006 in response to Message #211676
I guess, this is the difference between the open source and professional products. The OS vendors assume that experienced developers will eventually figure it out, which is true if your project really depends on this software.

My case is different. I'm writing a chapter for a book on integration Java with some third-party software by using messaging. Hence, I decided to take a couple of popular open source products such as ActiveMQ and Tomcat. After spending an hour unsuccessfully trying to make them talk to each other, I'm considering picking up another messaging tool for my sample application. I'm sure, if I'd spent a bit more time, I'd figure it out... But I'd rather spend my time doing something more creative than fighting with configuring queues, topics ports and jars.


I'm sorry to hear you are having trouble - though folks have trouble using proprietary products too (believe me, I've had lots of trouble with lots of proprietary products in the past :).

The way to get help with open source projects is to join the community and ask for help.

e.g. try using the Apache ActiveMQ discussion forum.
http://incubator.apache.org/activemq/discussion-forums.html

If you are writing a book on integration with Java it might be an idea to explain to your users how to work with open source and open source communities avoid getting stuck.

BTW with ActiveMQ you don't have to configure topics or queues. I can also recommend the FAQ which has lots of useful information in it.

James
LogicBlaze
Fuse: Open Source SOA

  Message #211709 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Not bits and pieces

Posted by: Roland Altenhoven on June 19, 2006 in response to Message #211676
On First, I think many Open Source Solutions are more "professional products" in the areas functionally, quality, documentation and support - as some others, provided by business manufacturer.

On Second: Each people working professionally in IT-Areas, knows that existing good business based products and bad business based products - sometimes you receives good documentation and business-support and sometimes you receives bad documentation and business-support for your problems - in some cases none of this.

How good is the documentation for the detailled configurations of "Business based Products" and Developments in Integration Areas really?

How great is the time exposure to learn Business Products, to know their configurations and the development for this solutions ?

Existing really great differences between Business based Products and Open Source Solutions by this criterions ?

What is the reason, because today are so many "Business Products" based basically on Open Source Technologies ?

What is the reason, because today so many professional projects are based basically on Open Source Technologies ?



I guess, this is the difference between the open source and professional products. The OS vendors assume that experienced developers will eventually figure it out, which is true if your project really depends on this software.

My case is different. I'm writing a chapter for a book on integration Java with some third-party software by using messaging. Hence, I decided to take a couple of popular open source products such as ActiveMQ and Tomcat. After spending an hour unsuccessfully trying to make them talk to each other, I'm considering picking up another messaging tool for my sample application. I'm sure, if I'd spent a bit more time, I'd figure it out... But I'd rather spend my time doing something more creative than fighting with configuring queues, topics ports and jars.


  Message #211752 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Not bits and pieces

Posted by: Yakov Fain on June 20, 2006 in response to Message #211701
James,

Thank you for the links, which add to my collection of bits and pieces :)

Open source products and commercial startups suffer the same disease: lack of "best practices" writeups. I've been attending a training on one of the very expesnive but new product. They taught us how to use their product. But what's the proper way of using this product with other product that an enterprise happened to have? The instructor was not able to answer...

A hugely popular Tomcat does not have its own messaging transport. ActiveMQ is earning a good reputation as an open source MOM. You do not have to be a rocket scientist to figure out that writing a set of "best practices" articles would really help in marketing of ActiveMQ...

Thank you for your response,
Yakov Fain

  Message #211753 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Not bits and pieces

Posted by: James Strachan on June 20, 2006 in response to Message #211752
James,

Thank you for the links, which add to my collection of bits and pieces :)

Open source products and commercial startups suffer the same disease: lack of "best practices" writeups. I've been attending a training on one of the very expesnive but new product. They taught us how to use their product. But what's the proper way of using this product with other product that an enterprise happened to have? The instructor was not able to answer...

A hugely popular Tomcat does not have its own messaging transport. ActiveMQ is earning a good reputation as an open source MOM. You do not have to be a rocket scientist to figure out that writing a set of "best practices" articles would really help in marketing of ActiveMQ...

Thank you for your response,
Yakov Fain


Totally agreed :)

The performance tuning guide was the first of hopefully many articles and best practice guides.

James
LogicBlaze
Fuse: Open Source SOA

  Message #211760 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Not bits and pieces

Posted by: Roland Altenhoven on June 20, 2006 in response to Message #211753
The performance tuning guide was the first of hopefully many articles and best practice guides.

James
LogicBlaze
Fuse: Open Source SOA


Please can I ask, which particular themes are actually planned ?

Existing such plans for ServiceMix too ?

Roland
SOA Kompetenznetzwerk
http://www.soa-competence-network.de

  Message #211769 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Not bits and pieces

Posted by: James Strachan on June 20, 2006 in response to Message #211760
The performance tuning guide was the first of hopefully many articles and best practice guides.

James
LogicBlaze
Fuse: Open Source SOA


Please can I ask, which particular themes are actually planned ?

Existing such plans for ServiceMix too ?

Roland
SOA Kompetenznetzwerk
http://www.soa-competence-network.de


We are in the planning stage now; we're hoping to distill down various best practices and content from our training courses and customer engagementts on using Fuse, ActiveMQ and ServiceMix into some more guides on the LogicBlaze DevZone.

James
LogicBlaze
Fuse: Open Source SOA

  Message #211811 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Not bits and pieces

Posted by: Roland Altenhoven on June 21, 2006 in response to Message #211769
James,

many thanks for your informations. All interested people to be well up in the great engagement from LogicBlaze and their professional team by many of the known Open Source Solutions.

I think that the numerous people from the Open Source Community and surely many Corporate Users of ActiveMQ and ServiceMix, are gladly to make available in such way their own experiences too, which can be very helpful to provide together a large number of this mentioned, magnificent extensions.

Nice days "y mucho Suerte" by the TSS-Conference beginning today in Barcelona.

Roland
SOA & ESA Kompetenznetzwerk
http://www.soa-competence-network.de
http://www.esa-competence-network.de



The performance tuning guide was the first of hopefully many articles and best practice guides.

James
LogicBlaze
Fuse: Open Source SOA


Please can I ask, which particular themes are actually planned ?

Existing such plans for ServiceMix too ?

Roland
SOA Kompetenznetzwerk
http://www.soa-competence-network.de


We are in the planning stage now; we're hoping to distill down various best practices and content from our training courses and customer engagementts on using Fuse, ActiveMQ and ServiceMix into some more guides on the LogicBlaze DevZone.

James
LogicBlaze
Fuse: Open Source SOA


New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com

Dependency Injection in Java EE 6 - Part 2

Reza Rahman continues to explore the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (January 21, Article)

Ted Neward Q&A: What you must know about JavaScript, Scala and more

Ted Neward is an independent consultant specializing in high-scale enterprise systems, and an authority in Java and .NET technologies. He is the author and co-author of several books, including Effective Enterprise Java. At TheServerSide Java Symposium in March, he will be presenting sessions on pragmatic architecture, ECMAScript and Scala. (January 15, Article)

Developers split on open sourcing Java

Now that Oracle is absorbing Sun Microsystems, there mixed views on what should come of the Java Community Process (JCP). While some say Oracle should become the new steward of Java and keep the JCP much as it was, others argue that it may be time to open-source this widespread language. (November 24, Article)

Dependency Injection in Java EE 6 - Part 1

Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (November 2, Article)

SAML: It's Not just for Web services

SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options. (September 28, Article)

Programming is Also Teaching Your Team

Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team. (September 22, Article)

Can Java EE Deliver The Asynchronous Web?

Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies. (July 14, Article)

JSF Flex

JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags. (June 29, Article)

The Rules of SOA - A Road to a Successful SOA Implementation

In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project. (June 23, Tech Talk)

Ari Zilka Talks About Terracotta 3.1

Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now. (June 15, Tech Talk)

Enterprise Application Integration, and Spring

In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements. (June 15, Tech Talk)

Google Web Toolkit: An Introduction

In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls. (June 4, Tech Talk)

Just Enough Early Architecture to Guide Development

Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable. (May 28, Tech Talk)

Productive Programmer: On the Lam from the Furniture Police

This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work. (May 26, Tech Talk)

Auto-Scaling Your Existing Web Application

Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers. (May 21, Tech Talk)

Automating Hibernate Mapping and Queries For Java Web Development

Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application. (May 19, Article)

Free Book: Jakarta-Struts Live

Download the entire book of Jakarta-Struts Live and learn about Struts MVC, Tiles, the Validator, DynaActionForms, plug-ins, internationalization, and more.
(Book PDF Download)

Application Server Matrix

The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
Java Solutions
All Content Copyright ©2007 TheServerSide Privacy Policy
Site Map