You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Nirmal Fernando <ni...@apache.org> on 2013/09/16 18:02:16 UTC

Making Stratos independent of underlying message broker

Hi All,

I've been working on $subject and have finished initial iteration.

Here's how the new design looks like:

[image: Inline image 1]

Let me briefly explain above diagram. We no more depend on one message
broker implementation/provider. Our publisher/subscriber code will only
talk to JMS APIs and will use the well known jndi.properties file to define
message broker related configurations. Every product will reuse a single
component (code related to topic connection/publish/subscribe/topic health
check will reside in one place).

You need to set the path to the directory of jndi.properties file in each
subscriber; -Djndi.properties.dir="/opt"

This way, if all Stratos components run on the same machine, you can share
a single jndi.properties file.

I've tested the code with WSO2 MB and it seems to be okay. Here's my
jndi.properties file.

*java.naming.factory.initial =
org.wso2.andes.jndi.PropertiesFileInitialContextFactory

# use the following property to configure the default connector
connectionfactory.topicConnectionfactory = amqp://admin:admin@clientID
/carbon?brokerlist='tcp://cc.apache.org:5677'&reconnect='true'

# use the following property to specify the JNDI name the connection factory
# should appear as.
connectionFactoryNames = connectionfactory, topicConnectionfactory*


I'm about to commit the changes to the master branch.

I'd like to invite you to get the code, and test Stratos with a different
message broker.

Thanks.