Inhalt
Michael Raber
CEO
Your partner for ERP and technology.
ActiveMQ is the most popular and a very reliable message broker. It is Java-based, multi-protocoll and open source. You can connect to ActiveMQ using different clients written in JavaScript, .Net, C++ and more. One thing to highlight is the support of the MQTT protocol with which you can manage you IOT devices. MQTT is a synonym for MQ Telemetry Transport. This is a protocol, which defines a set of rules how IOT devices can publish data or subscribe to data in your network.
How ActiveMQ works
Simply explained, ActiveMQ is a messaging service that sends data between systems and applications. It that way you can connect nearly everything with everything, including your IBMi.
To achieve that, ActiveMQ is the middleman between the application communicating with each other. A Publisher writes a message in a named queue and a subscriber receives the message. The publisher does not know if the subscriber is up and running and the other way round. This separation makes application more robust and simplifies software development.
The IBM i
The IBM is an integrated operating system and hardware platform developed by IBM. It serves since decades through its scalability, reliability and flexibility a multitude of customers worldwide with proven success. IBMi is the leading integrative platform for managing and running business oriented workload combining legacy software with modern open source techniques.
About this ActiveMQ tutorial
We will install Active MQ on the IBMi and show you how to use ActiveMQ Message Queues.
Installation on the IBM i
To install ActiveMQ we are using the Access Client Solutions package management which comes with the ACS package from IBM.
Connect to your IBMi with your user credentials. Do not forget to check if the SSHD TCP Server is started. If it is not, start it on the green screen with this command: STRTCPSVR SERVER(*SSHD)
A new window is opening. Here please choose ActiveMQ and click the Install button:
To start ActiveMQ, go to the installation folder (SSH) and type:
To start ActiveMQ automatically at system startup, you can add this command to your startup job. In this example we are using the User activemq:
The URL to your working ActiveMQ instance on the IBMi is:
http://youribmi:8161
If you are asked for a user id and password, use admin/admin.
When everything works as expected you will see this page:
Now click on “Manage ActiveMQ broker” and you are seeing this page:
To test our installation, we must ensure that the queues are working.
To do that, select the Queues button. Enter a queue name and press on create:
As you can see, we have created a queue named actQueue.
No we are sending data to this queue. To do that, press “Send to” on the rights side of the Queue-Name. On the next screen, the Destination and Queue is already populated. Type in the message you want to send in the message body and press the send button:
The Queue ActQueue now shows you a message.
To see the message, click on the browse button:
When you click on the Message ID, you can see the message we just created.
Conclusion on ActiveMQ on the IBM i
As you can see, here we can also delete the message with the delete button on the right side.
This is only a small proportion of the capabilities ActiveMQ can provide to you. We did not touch the Topics option, where the messages are distributed from one publisher to many subscribers, how these subscribers can subscribe to a queue or many other features ActiveMQ provides.
To see a full list of all features, visit the Homepage of the ActiveMQ-project.
Contact us now
Marcel Kosel
Sales Manager