Chandra Shekhar Pandey

Areas of Expertise

Red Hat JBoss Fuse, Red Hat JBoss AMQ, Activemq, FIS, Openshift, Java

Recent Posts

Secure authentication with Red Hat AMQ 7.7 and ApacheDS LDAP server

Secure authentication with Red Hat AMQ 7.7 and ApacheDS LDAP server

In this article, we will integrate Red Hat AMQ 7.7 with the ApacheDS LDAP server. However, any version of the AMQ 7.x series can be integrated with the steps mentioned in this article.

For this example integration, we’ll use Apache Directory Studio, which is an LDAP browser and directory client for ApacheDS. You will learn how to set up the ApacheDS LDAP server from scratch, and how to integrate the new LDAP configuration changes that are required in AMQ 7.7. Finally, we’ll test the integration with an AMQ 7.7 shell-based client, using Hawtio as a graphical user interface (GUI). This will be helpful to system administrators and developers as they can quickly create a proof of concept for LDAP and AMQ integration. This will help in enabling role-based access control(RBAC) for accessing AMQ 7.7.

Note: Our example is based on security-ldap, which shows how to configure and use a secure Java Message Service (JMS) application layer with ActiveMQ Artemis and the ApacheDS LDAP server. This example ships with all AMQ 7.x distributions. I have tested the integration in Fedora 32 and the OpenJDK version of Java 8 (1.8.0_252).

Continue reading “Secure authentication with Red Hat AMQ 7.7 and ApacheDS LDAP server”

Share
Adding keystores and truststores to microservices in Red Hat OpenShift

Adding keystores and truststores to microservices in Red Hat OpenShift

You might not need Secure Socket Layer (SSL)-based communication between microservices in the same cluster, but it’s often a requirement if you want to connect to a remote web service or message broker. In cases where you will expose a web service or other endpoints, you might also have to use a custom keystore in a microservice deployed on Red Hat OpenShift, so that external clients only connect with a specific truststore.

In this article, I show you how to configure a keystore and a truststore for a Java-based microservice built with Spring Boot. I used the Apache Camel and CXF libraries from Red Hat Fuse to develop the microservice. I used a source-to-image (S2I) deployment and tested the examples in Red Hat OpenShift 4.3.

Continue reading “Adding keystores and truststores to microservices in Red Hat OpenShift”

Share
Autoscaling Red Hat Fuse applications with OpenShift

Autoscaling Red Hat Fuse applications with OpenShift

In this article, we demonstrate Red Hat OpenShift’s horizontal autoscaling feature with Red Hat Fuse applications. The result is a Spring Boot-based application that uses the Apache Camel component twitter-search that searches Twitter for tweets based on specific keywords. If traffic or the number of tweets increases, and this application cannot serve all requests, then the application autoscales itself by increasing the number of pods. The ability to serve all requests is monitored by tracking this application’s CPU utilization on a particular pod. Also, as soon as traffic or CPU utilization is back to normal, the number of pods is reduced to the minimum configured value.

There are two types of scaling: horizontal and vertical. Horizontal scaling is where the number of application instances or containers is increased. Vertical scaling is where system resources like CPU and memory are increased at the running application’s or container’s runtime. Horizontal scaling can be used for stateless applications, whereas vertical scaling is more suitable for stateful applications.

Continue reading “Autoscaling Red Hat Fuse applications with OpenShift”

Share
4 steps to set up the MQTT secure client for Red Hat AMQ 7.4 on OpenShift

4 steps to set up the MQTT secure client for Red Hat AMQ 7.4 on OpenShift

In this article, we show how to set up Red Hat AMQ 7.4 on Red Hat OpenShift. Also, we show how to connect the external Message Queuing Telemetry Transport (MQTT) secure client to the AMQ 7.4 platform. MQTT is a Java-based client that uses the Eclipse Paho library and can publish and consume messages from Red Hat AMQ 7.4 Broker on OpenShift using secure transport. These commands and code have been verified with OpenShift 3.11.

Continue reading “4 steps to set up the MQTT secure client for Red Hat AMQ 7.4 on OpenShift”

Share
Red Hat AMQ 6.3 on OpenShift: Set up, connect SSL client, and configure logging

Red Hat AMQ 6.3 on OpenShift: Set up, connect SSL client, and configure logging

In this article, we will discuss how to set up Red Hat AMQ 6.3 on OpenShift. We will also set up an external Camel-based SSL client to connect to AMQ Broker, a pure-Java multiprotocol message broker.

By using the procedures in this article, you can easily set up the broker in your OpenShift environment and also set up a Camel-based client to quickly produce and consume messages. Also, you can change the log level to get verbose logs, thus getting a better understanding of the complete setup.

I recommend using a source-to-image (s2i) approach for deploying Red Hat AMQ 6.x on OpenShift, but if you do not use an s2i  approach, this article will help you to configure logging to get verbose logs.  Note that the Red Hat AMQ image used here is ephemeral; it doesn’t support persistence.

Continue reading “Red Hat AMQ 6.3 on OpenShift: Set up, connect SSL client, and configure logging”

Share
How to configure a JDBC Appender for Red Hat Fuse 7 with Karaf

How to configure a JDBC Appender for Red Hat Fuse 7 with Karaf

For some integration projects it is helpful to persist application logs in a relational database instead of a plain log file. In this article, I show how to configure a JDBC appender for Red Hat Fuse 7 running in an Apache Karaf environment. There are instructions that describe how to persist messagess with PostgreSQL. Instead, I will show how to setup a JDBC appender for Oracle Database 11g.

I have tested this procedure with Oracle Database 11g Express Edition. A major difference I found is with the table syntax and the fact that the Oracle Database 11g sequence and trigger were required to auto-generate the primary key. Hence, users of Oracle Database 11g should find this article useful.

Continue reading “How to configure a JDBC Appender for Red Hat Fuse 7 with Karaf”

Share
Logging incoming and outgoing messages for Red Hat AMQ 7

Logging incoming and outgoing messages for Red Hat AMQ 7

In this article, I will discuss how to capture incoming and outgoing messages for Red Hat AMQ 7 (RHAMQ 7). This might advantageous if you need to log the incoming or outgoing traffic, or the messages from a broker, or during development and/or testing when you want to see all message. Additionally, There may also be a need to modify messages in transit. Using RHAMQ 7 interceptors, you can intercept traffic to and from the RHAMQ 7 broker. You can also modify messages using the interceptor.

Continue reading “Logging incoming and outgoing messages for Red Hat AMQ 7”

Share
Using the STOMP Protocol with Apache ActiveMQ Artemis Broker

Using the STOMP Protocol with Apache ActiveMQ Artemis Broker

In this article, we will use a Python-based messaging client to connect and subscribe to a topic with a durable subscription in the Apache ActiveMQ Artemis broker. We will use the text-based STOMP protocol to connect and subscribe to the broker. STOMP clients can communicate with any STOMP message broker to provide messaging interoperability among many languages, platforms, and brokers.

If you need to brush up on the difference between persistence and durability in messaging, check Mary Cochran’s article on developers.redhat.com/blog.

A similar process can be used with Red Hat AMQ 7. The broker in Red Hat AMQ 7 is based on the Apache ActiveMQ Artemis project. See the overview on developers.redhat.com for more information.

Continue reading “Using the STOMP Protocol with Apache ActiveMQ Artemis Broker”

Share
Setting Up a Failover Scenario Using Apache Camel ZooKeeper

Setting Up a Failover Scenario Using Apache Camel ZooKeeper

In this article, we will discuss using the Apache Camel ZooKeeper component, and demonstrate how easily we can set up a fail-over scenario for Apache Camel Routes. While working in a clustered environment, situations arise where a user wants to have a backup or slave route which will become active only when the master (or the currently active) route stops working. There are different ways to achieve this: one can use Quartz to configure a master-slave setup; JGroups can also be used. In a Fabric8 environment, there is a master component which can easily be set up as a failover scenario.

Continue reading “Setting Up a Failover Scenario Using Apache Camel ZooKeeper”

Share
Deploying a Spring Boot App with MySQL on OpenShift

Deploying a Spring Boot App with MySQL on OpenShift

This article shows how to take an existing Spring Boot standalone project that uses MySQL and deploy it on Red Hat OpenShift,  In the process, we’ll create docker images which can be deployed to most container/cloud platforms. I’ll discuss creating a Dockerfile, pushing the container image to an OpenShift registry, and finally creating running pods with the Spring Boot app deployed.

To develop and test using OpenShift on my local machine, I used Red Hat Container Development Kit (CDK), which provides a single-node OpenShift cluster running in a Red Hat Enterprise Linux VM, based on minishift. You can run CDK on top of Windows, macOS, or Red Hat Enterprise Linux.   For testing, I used Red Hat Enterprise Linux Workstation release 7.3. It should work on macOS too.

To create the Spring Boot app I used this article as a guide. I’m using an existing openshift/mysql-56-centos7 docker image to deploy MySQL to  OpenShift.

Continue reading “Deploying a Spring Boot App with MySQL on OpenShift”

Share