Sunday, August 11, 2024

ActiveMQ Can Integrate IBM i to Anything

In today's world there are a few ways to do platform agnostic messaging with IBM i. This post introduces you to ActiveMQ.

If your business has the need to send and receive messages and data across platforms in a transactional fashion, the classic way to do that internally on IBM i might be to use data queues. Data queues have been around since the early days of the AS/400. The AS/400 was introduced back in 1988. However data queues are generally used to communicate intra-system between RPG, CL and COBOL apps built within the IBM i operating system. In today's world of multi-platform communications with API calls and REST services across multiple servers and services, ActiveMQ and Kafka can be better vehicles for exchanging transaction data and messages than using data queues. The topic of this post will focus on using ActiveMQ to implement platform agnostic messaging from your IBM i. But the same concepts can be applied using Kafka and even RabbitMQ.

First some background on ActiveMQ from the ActiveMQ web site: Apache ActiveMQ® is the most popular open source, multi-protocol, Java-based message broker. It supports industry standard protocols so users get the benefits of client choices across a broad range of languages and platforms. Connect from clients written in JavaScript, C, C++, Python, .Net, and more. Integrate your multi-platform applications using the ubiquitous AMQP protocol. Exchange messages between your web applications using STOMP over websockets. Manage your IoT devices using MQTT. Support your existing JMS infrastructure and beyond. ActiveMQ offers the power and flexibility to support any messaging use-case. 

Let's talk about a few potential use cases for ActiveMQ messaging on your IBM i and other systems. These use case examples are meant to get you thinking about the potential uses for messaging with your apps. 

Shipment lookups - Let's say you have the need to do shipment lookups from an IBM i green screen or web application and it's not so easy to integrate to your shippers from RPG. You can set up a PHP, Node, Python, Java or other server that can easy make the calls to the external shipper. Then you set up a queue via ActiveMQ to receive the shipment lookup request data from your classic IBM i code. Requests are usually sent from direct RPG, COBOL or CL calls by composing a delimited request string of data, a JSON or XML packet. Response data can then be returned directly to your IBM i app from the message queue after a shipment lookup has been performed.

Realtime credit card processing - A credit card request can be composed from RPG and sent to your credit card processing program via JSON, a REST call and an ActiveMQ message. The credit card request gets processed and then the response token or other information can be returned back to the RPG program or directly to a DB2 database table once the transaction is complete. 

Incoming orders or mobile work - Let's say your company has implemented a mobile app to handle capturing new orders on an iOS or Android device. As orders are completed the data can be dropped into a message queue for ActiveMQ to pick it up and send the data to an RPG, COBOL or other process which ultimately updates the system of record database without needing to re-key order data. Orders and service requests could also be staged to a mobile device over message queues as well. 

Sending order or shipment data to e-commerce site - As orders and shipments get fulfilled from an IBM i ERP system, transactions can be queued up for a remote Linux or Cloud based e-commerce app to pick up. On the e-commerce site an agent can be set to receive the order, shipment or inventory updates and auto-update the SQL Server, Oracle, PostgreSQL or MariaDB database in real-time fashion.

Placing EDI supplier orders - Imagine your team currently enters material and parts orders into your IBM i ERP system and then the same orders end up being re-keyed by hand to your supplier's portal, even though they offer a web API.  What if new and updated orders could be entered into your IBM i system once and then updated in real-time to your supplier portal using their integration API. Many hours of manual effort can be saved by entering and checking supplier order status via a web API.

All of the above integration scenarios are available to your RPG, COBOL and CL applications without forcing your classic IBM i RPG development team to learn new methods of coding to implement APIs and integrations between your various application platforms and apps. 

For a little more in-depth reading I listed a couple of articles below. Read these if you want to learn more about ActiveMQ and give it a try with your IBM i. 

Using ActiveMQ message queues on the IBM I

ActiveMQ from PowerWire - Andy Youens

Apache ActiveMQ Site

If your team needs mentoring or learning how to use ActiveMQ, or if your team needs help with process modernization discovery, training, mentoring and integration services, reach out and let's talk about your business automation pain points. Your team will be on track to streamlining and modernizing your IBM i processes in no time. 

Web Site: https://www.mobigogo.net

Email: info@mobigogo.net



No comments: