Topic to Queue Bridge |
Use a Docker Image
I used an ActiveMQ docker image found here. It was pretty straightforward and was able to get it running after a few commands. Here is what I did to define a baseline (this is from the instructions in the link above):
docker run --user root --rm -ti \
-v /Users/alberto/workspace/docker/activemq/conf:/mnt/conf \
-v /Users/alberto/workspace/docker/activemq/data:/mnt/data \
rmohr/activemq:5.15.4-alpine /bin/sh
Notice the following:- I created the /conf and /data directory in my dev box.
- I mounted these folders into the /mnt/* respective to my local box.
- As the end of this command, a shell will be started inside the docker container
chown activemq:activemq /mnt/conf
chown activemq:activemq /mnt/data
cp -a /opt/activemq/conf/* /mnt/conf/
cp -a /opt/activemq/data/* /mnt/data/
exit
Now, I have the configuration in my "conf" folder.Configure ActiveMQ
Within the "conf" folder, we need to edit the activemq.xml file.
The important lines here are from 125 to 136 where I use "VirtualDestinations".
Test Message Forward
You can now go to the admin console at:
http://localhost:8161/admin/send.jsp
and send a message to the topic. You will see messages forwarded to the queues of your choice.
No comments:
Post a Comment