Skip to main content

Create message store and processor with WSO2 EI and ActiveMQ

 In this tutorial, we will show you how to create a message store and processor in WSO2 Enterprise Integrator (EI) using ActiveMQ. Message stores and processors are essential components in EI, and they are used to store and process messages in a reliable and efficient manner. We will go through the process of setting up and configuring ActiveMQ as the message broker and integrating it with WSO2 EI. You will learn how to create a message store and processor in WSO2 EI, how to send and receive messages using these components, and how to troubleshoot common issues.
  1. Download Apache ActiveMQ.(I used ActiveMQ 5.15.12)
  2. Copy following jars into the <EI_HOME>/lib directory from <ActiveMQ_HOME>/lib
  • activemq-broker-5.15.12.jar
  • activemq-client-5.15.12.jar
  • activemq-kahadb-store-5.15.12.jar
  • geronimo-jms_1.1_spec-1.1.1.jar
  • geronimo-j2ee-management_1.1_spec-1.0.1.jar
  • geronimo-jta_1.1_spec-1.1.1.jar
  • hawtbuf-1.11.jar

3. Add the following listener to the <EI_HOME>/conf/axis2.xml

4. Start ActiveMQ server with ./activemq console command by running it on <ActiveMQ_HOME>/bin directory.

5. Start WSO2 EI with the following command.

6. Create sequence name `failover` to store failing message. This can be a in memory message store.

7. Create message store `JMSMS` with following configs:

8. Create proxy service test to publish messages to the message store with following configs:

9. Create a sequence logdata to do the processing task as follows:

10. Create message sampling processor with the following configs:

11. Invoke the test proxy service with POST request and custom message body. The request body will get printed in console after message send to the message store and processor trigger the logdata sequence.

Comments

Popular posts from this blog

Database Internel Architecture: SQLite

Introduction A database is an essential part of building a software system which used to store and read data efficiently. Here, We are going to discuss some architectural details of database implementation by using an early version of SQLite. SQLite is a small database application which used in millions of software and devices. SQLite invented by D.Richard Hipp in August 2000. SQLite is a high performance, lightweight relational database. If you are willing to learn internal of a database in coding level, then SQLite is the best open source database available out there with highly readable source code with lots of documentation. Reading later versions of SQLite become a little harder since it contains lots of new features. In order to understand the basic implementation of database internals, You should have good knowledge about data structures, some knowledge about Theory of Computing and how an operating system works. Here we are looking into the SQLite 2.5.0 version. Here ...

Weird Programming Languages

There are thousands of programming languages are invented and only about hundred of programming languages are commonly used to build software. Among this thousands of programming languages, there are some weird type of programming languages can be also found. These programming languages are seems to be called weird, since their programming syntax and the way it represent its code. In this blog we will look into some of these language syntax. Legit Have you ever wonder, when you come to a Github project that print hello world program, but you cannot see any codes or any content. Check this link  https://github.com/blinry/legit-hello  and you will see nothing in this repository. But trust me, there is hidden code in this project. If you see the  commit  section, you can reveal the magic. Yeah, you are right. Its storing hello world code in inside the git commit history. If you clone this project and run the following command, then you can see the hidden code i...

[Short Blog] Apache Kafka consumer with WSO2 Micro integrator

  This document contains steps that I have followed to setup inbound endpoint with Kafka Avro messages. Setting up Kafka server and UI First download theKafka kafka_2.11–2.2.1 for Zookeeper and Kafka server.  https://archive.apache.org/dist/kafka/2.2.1/kafka_2.11-2.2.1.tgz Start Zookeeper with kafka_2.11–2.2.1. Go to the kafka home folder and execute: bin/zookeeper-server-start.sh config/zookeeper.properties` The same way, start Kafka with : bin/kafka-server-start.sh config/server.properties Download confluent-5.2.1 for Schema registry  https://packages.confluent.io/archive/5.2/confluent-community-5.2.1-2.11.tar.gz Start Schema registry with following command on the confluent home folder: bin/schema-registry-start ./etc/schema-registry/schema-registry.properties As the UI for Kafka I used  https://github.com/provectus/kafka-ui . Optionaly you can use it to confirm messages are publishing correctly. You can use prebuilt jar file and start the UI with following command...