Wednesday, February 28, 2018

SpringBoot Externalization Part 1: Develop Externalization Server

Spring Boot lets you externalize your configuration so that you can work with the same application code in different environments. You can use properties files, YAML files, environment variables, and command-line arguments to externalize configuration. Property values can be injected directly into your beans by using the @Valueannotation, accessed through Spring’s Environment abstraction, or be bound to structured objects through @ConfigurationProperties.

This thread discusses connection of Spring Externalization Config Server and it caches the properties from Git Hub.

The properties files are in YAML format that are stored on GIT. 

 MindTelligentExternalizationApplication Server Configuration:

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

public class MindTelligentExternalizationApplication {

public static void main(String[] args) 
{ .class, args);


Package the code with application.yml file:

  port: 8888
          searchPaths: src

          password: XXXXXXXX 

Build the Code with Maven:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""


        <relativePath /> <!-- lookup parent from repository -->






            <name>Spring Milestones</name>


  • Once this is built. Run the JAR file with the command
java -jar MindTelligentIotConfigurationService-0.0.1-SNAPSHOT.jar

Log on to the browser and validate by:


You should be able to see the contents on the browser.

Saturday, February 3, 2018

Important Kafka Commands

Important Kafka Commands

MindTelligent has developed an open source Kafka Administration Framework. This framework monitors the health of Kafka And Zookeeper nodes. It also ships a bunch of important Kafka commands.

These commands can be executed from $KAFKA_HOME/bin directory

Command to Set the Kafka Topic retention Period for 10 days:

./ --zookeeper localhost:2181 --alter --topic mindtelligent_topic  --config

Command to Set Kafka Kafka partitions to 6 :

./ --zookeeper localhost:2181 --alter --topic mindtelligent_topic --partitions 6

Command to View offsets for the Kafka Consumer Group and instances for a consumer group:

./ --bootstrap-server localhost:9092 --describe --group mindtelligent_topic_group

Command to list all Kafka Consumer Groups across all topics:

./ --bootstrap-server localhost:9092 --list

Command to set the Kafka Offset to earliest:

./ --bootstrap-server localhost:9092 --group mindtelligent_topic_group --reset-offsets --to-earliest --topic mindtelligent_topic --execute

Command to set the Kafka Offset to Latest:

./ --bootstrap-server localhost:9092 --group mindtelligent_topic_group --reset-offsets --to-latest --topic mindtelligent_topic --execute

List Kafka Topic:

./ --zookeeper localhost:2181 --list

Describe a Kafka Topic:

./ --zookeeper localhost:2181 --describe --topic mindtelligent_topic

Purge a Kafka Topic:

./ --zookeeper localhost:2181 --alter --topic mindtelligent_topic--config

Delete a Kafka Topic: 

./ --zookeeper localhost:2181 --delete --topic mindtelligent_topic

Get Number of Messages in a Kafka Toipc:

./ --broker-list localhost:9092 --topic mindtelligent_topic--time -1 --offsets 1 | awk -F ":" '{sum += $3} END {print sum}'

Get the earliest offset still in a topic:

./ --broker-list localhost:9092 --topic mindtelligent_topic  --time -2

Get the latest offset still in a topic:

./ --broker-list localhost:9092 --topic mindtelligent_topic --time -1

Oracle SOA 12c: How To Create READ-ONLY Access To The JMS Messages For Monitor User

Create a user who only can view the JMS Messages and can not create,  delete,  move or import JMS Messages, and can not monitor other resour...