Name

ActiveMQ — allows messages to be sent to or consumed from a JMS destination using Red Hat JBoss A-MQ

Overview

The ActiveMQ component is a specialized version of the JMS component that makes connecting to Red Hat JBoss A-MQ easy. It uses Spring's JMS support for declarative transactions, using Spring's JmsTemplate for sending and a MessageListenerContainer for consuming.

URI format

The URI format for an ActiveMQ endpoint is:

activemq:[queue:|topic:]destinationName?options

Where destinationName is an Red Hat JBoss A-MQ queue or topic name. By default, destinationName is interpreted as a queue name. To connect to a topic, you must include the topic: prefix.

Dependencies

To use this component make sure the following are on the application's classpath:

  • activemq.jar or activemq-core.jar

  • camel-core.jar

  • camel-spring.jar

  • camel-jms.jar

In addition, camel-jms and activemq-camel must be listed as a dependency in the pom as shown in Example 12, “Red Hat JBoss A-MQ dependencies”.

Example 12. Red Hat JBoss A-MQ dependencies

<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-jms</artifactId>
  <version>1.6.0</version>
</dependency>
<dependency>
  <groupId>org.apache.activemq</groupId>
  <artifactId>activemq-camel</artifactId>
  <version>5.2.0</version>
</dependency>

Options

See the JMS component options for the ActiveMQ component's options.

Related topics

JMS