Load testing JBossESB over JMS with JMeter
Very simple example of applying a load on JBossESB via JMS, using jmeter. It does not really measure anything, but is a simple way to write a large volume of messages to a JMS Queue. This sample only covers a request only (one way) scenario, but could be easily modified to load test a request/response service, measuring response time.
These steps assuming a working JBossESB install exists at $JBOSSESB.
- Define and verify a JBossESB service. The simplest case would be a gateway queue, an ESB queue, and a single action. Here is a sample jboss-esb.xml
- Download jmeter here: http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi
- Unpack and start to verify it works (start with jmeter.bat for win or jmeter for *nix)
- Add the required jars to your jmeter classpath. Locate your JBoss install. Copy the following files to your jmeter/lib/ext directory:
- Create a new jmeter test plan. Add a thread group. Right click the thread group > Add > Sampler > JMS Point to Point.
- Edit the sampler:
- QueueConnection Factory: “ConnectionFactory”
- JNDI name Request queue: The name of your ESB service’s gateway queue (“queue/someGatewayQueue”)
- Communication style: Request Only
- Content: The contents of the message to be written to the queue
- Initial Context Factory: org.jnp.interfaces.NamingContextFactory
- Add property to JNDI Properties with Name: java.naming.provider.url, and Value: jnp://localhost:1099 (adjust accordingly)
- Save the test plan.
- Adjust the Thread Group parms accordingly (thread count, iterations, etc) and run the test.
Update for JBoss AS 5.1 + JBoss ESB 4.7; or JBoss SOA-P 5.0.0
- Instead of copying individual files above, copy all jars from $JBOSSESB/client to $JMETER/lib/ext