A full SMS Environment using Mule ESB and SMPPSim(Step 1-Configuration)


After spending time trying to figure out how to use services like Clickatell,Twilo etc.So I decided that is better to use mule to emulate a scenario of a typical SMSC service that communicates with several other services for distributing messages to end clients. The other services can spawn from simple reading from a queue using MuleESB and forwarding the payload of the message as an SMS to an end user using a custom smpp connector which is defined using the mule dev kit. If you have to many unknown words be patient and everything will be explained later on.But let’s kick start with what you will be needing.The list isn’t exclusive but refers to tools of my choice and isn’t limited by them.Frameworks and tools providing the same functionality can be used but is up to you to configure them. My “lab” consists of:

Laboratory configuration

Wildfly 8.0.0 Final as  Application Server

As always a JBoss fun the new 7.1.1 version coded dname Brontes(after the greek word Βροντες which imply the sounds you hear in the atmosphere before the rain) or the latest javaee7 compatible appserver by JBoss named Wildfly. We will use the JMS module of the application server. We need to define a queue in which we will be injecting our payload to be route.To do so, open we will use the standalone full configuration of the application server. So we go in our $JBOSS_HOME/standalone/configuration/ and edit the file stanalone-full.xml. Find the lines of the jms destination definition and add the following lines:

<jms-queue name="HighInOne">
<entry name="queue/HighInOne"/>
<entry name="java:jboss/exported/jms/queue/HighInOne"/>

This will create the necessary queue, where Mule will reroute messages. This can allso be created by using also the found in the bin/ folder of your application server. After you have setup the queue fire app the application server with the following command : ./standalone –server-config=standalone-full.xml -b

Fire up your favourite browser and point to localhost:8080 and voila, the magic is there. A small tip is for accessing the console you need to create the necessary users by utilizing the ./ script in the /bin/ folder of your application server. This finishes the necessary part of the application server.

Mule ESB 3.4.0 – ESB deployment platform

Few years now my ESB of choice is Mule ESB. The reason really straightforward: Easy of use. Taming the Mule can be really easy my using a mule-config.xml file in a folder under the apps/ directory. Here we will use it, deploy also Camel. Thus copy the necessary camel jars under the $MULE_HOME/lib/user and you are done. Go to $MULE_HOME/bin/ and fire up mule and there you are done.

SMPPSim – smslib

The first one is an smpp gateway simulator. The configuration rather straightforward.Unzip and run. Some configuration if you want to handle difference users and level of security.But simply unzip and fire it up. As a replacement these days I use an SMPP implmenentation by Twitter which uses the new Netty NIO and is lightning fast called cloudhopper. Take under consideration that I prefer building the jsmpp library that the library has as dependency because the one provided by the maven repositories are corrupted. So build and enjoy

These tools will be the base working stuff of our lab. In the next step we will define specific configuration so that we can use them send messages around.