WSO2 Message Broker in Tenant Mode

WSO2 Message Broker, with redesigns of 3.0.0 version, will be able to operate in tenant mode. WSO2 Carbon comes with tenant story. We have integrated same story into WSO2 Message Broker so that two tenants can use a single instance of MB server without knowing each other at all.

Queues and Topics in Tenants


When you log into WSO2 MB as "example.com" and create a queue called "myQueue", MB will actually create a queue named "example.com/myQueue". When you create queue or topic in MB tenant, it is created as tenant_domain/queue_name

JNDI for Tenant Queues/topics


When you define jndi.properties in WSO2 ESB (which will act as a client for WSO2 MB), or write a java client to connect as a tenant, you need to define the AMQP connection as follows.

connectionfactory.QueueConnectionFactory = amqp://admin!example.com:example123@carbon/carbon?brokerlist='tcp://localhost:5672'
connectionfactory.TopicConnectionFactory = amqp://admin!example.com:example123@carbon/carbon?brokerlist='tcp://localhost:5672'

Here username you have to provide as fully qualified name and replace @ with !


If you use the above queue as a JMS endpoint in ESB to push messages, it should come as (using jndi.properties)



Limitations in ESB + MB Story for Tenants


Limitation of this is you can work with one tenant at a time, because we need to hard code connection username and password in jndi.properties file. ESB 4.9.0 comes up with Inbound endpoints as a solution for this (this is what my belief is).


Hasitha Hiranya

No comments:

Post a Comment

Instagram