Chandra Shekhar Pandey

Areas of Expertise

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

Recent Posts

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

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

Enabling Byteman Script with Red Hat JBoss Fuse and AMQ – Part 2

In my previous article, Enabling Byteman Script with Red Hat JBoss Fuse and AMQ – Part 1, we found a basic use-case for Byteman scripts with Red Hat JBoss Fuse or Red Hat JBoss AMQ. However, the log file was generated separately and only limited operations were possible. In this article I will show you how to use a Java helper class. By using Java, we get advanced operations to view or modify the content. Also, using java.util.logging allows us to log the statements to fuse.log, avoiding the creation of any other log file.

Continue reading “Enabling Byteman Script with Red Hat JBoss Fuse and AMQ – Part 2”

Share

Enabling Byteman Script with Red Hat JBoss Fuse and AMQ – Part1

In a production or customer environment it is not always possible to identify issues by looking at logs, nor is it always possible to setup remote debugging using an integrated development environment (IDE) and remote debug port. Often the issues are specific to the environment and can’t be reproduced. Having byteman scripts can help in these situations to identify issues without actual code changes. Whenever certain java class or logic is invoked, byteman scripts will also be invoked as per defined class and method in the byteman script.

Continue reading “Enabling Byteman Script with Red Hat JBoss Fuse and AMQ – Part1”

Share

Using Camel-Undertow component supporting http2 connection

This article would help to configure http2 protocol support for the camel-undertow component.

  • Camel’s undertow component use embedded undertow web-container of version undertow-core:jar:1.4.21. This version also supports the http2 connection.
  • I have used camel version 2.21.0-SNAPSHOT from upstream https://github.com/apache/camel.
  • Also, the curl version to test application using camel-undertow component is 7.53.1. This curl version supports –http2 flag for sending an http2 request.
  • I have also used nghttp to test application from linux terminal. However, this article is not about http2 insights.
  • For http2 details, I found articles [1] and [2] helpful.

Continue reading “Using Camel-Undertow component supporting http2 connection”

Share

Configuring mKahaDB persistence storage for ActiveMQ

In this post, I wanted to address how to configure mKahaDB persistence storage on ActiveMQ for better management and reducing disk usage.

Default configured KahaDB persistence adapter works well when all the destinations (queues/topics) being managed by the broker have similar performance. However, an enterprise solution where several third parties are involved is never the case.

There are multiple queues or topics and different consumers or listeners listening to these queues/topics. Some consumers might be slower than other consumers. This will grow the message store’s disk usage rapidly. Due to this situation and being single KahaDB all store destinations might perform slow.

Continue reading “Configuring mKahaDB persistence storage for ActiveMQ”

Share
Dynamic Storage

How to configure persistent storage with OpenShift or Kubernetes for development environment

  • We know that containers in Openshift or Kubernetes don’t persist data. Every time we start an application, it is started in a new container with an immutable Docker image.
    Hence, any persisted data in the file systems is lost when the container stops. Hence if an application or container is rebuilt or restarted than we can’t view previous logs or if we are using containers with mysql or any other database then schema, tables, and all data will be lost, if using any messaging broker than if there is journal file than it will also not persist.
    Hence, these ephemeral containers cannot be used in production environment. In a production environment, we must configure a shared storage.
  • But what about the development environment, because we might not always have enough labs and VM’s available. To rescue we have volume type hostPath, which can be easily set up with Minishift and Minikube.
  • This article will provide details how to setup hostPath volume type.

Continue reading “How to configure persistent storage with OpenShift or Kubernetes for development environment”

Share

How to run FIS 2.0 application using source S2I deployment procedure

This article describes how to create and deploy an FIS 2.0 project using the s2i source workflow. It creates a project from scratch and using github repository one can deploy their FIS 2.0 camel and spring-boot based project to an Openshift environment. Below are the steps in the sequence, which should be followed to deploy the application easily.

Continue reading “How to run FIS 2.0 application using source S2I deployment procedure”

Share