This repo is a template for developing your ActiveMQ authentication plugin.
Its main purpose is to define the bare minimum dependencies and steps to add it to your ActiveMQ installation.
This simple authentication plugin authenticates using username and password
mvn package
- Download ActiveMQ 6.x here
- Unzip the tarball or zip file you just downloaded. For example,
unzip ~/Downloads/apache-activemq-6.1.5-bin.zip
- Copy the built jar in the
lib
sub-folder of the installation. For examplecp ./target/activemq-plugin-1.0-SNAPSHOT.jar ~/Downloads/apache-activemq-6.1.5/lib/
- Add the plugin to activemq.xml
<plugins>
<bean xmlns="http://www.springframework.org/schema/beans" id="sampleAuthPlugin" class="com.activemq.auth.plugin.SampleAuthenticationPlugin">
<property name="users">
<list>
<bean class="org.apache.activemq.security.AuthenticationUser">
<constructor-arg value="your-username"/> <!-- Username -->
<constructor-arg value="your-password"/> <!-- Password -->
<constructor-arg value="your-group"/> <!-- Groups (comma-separated) -->
</bean>
</list>
</property>
</bean>
</plugins>
$ cd ~/Downloads/apache-activemq-6.1.5/
$ ./bin/activemq console
$ ./bin/activemq producer --brokerUrl "tcp://localhost:61616" --user $username --password $password --destination queue://tq --message 10 --messageSize 100