views:

956

answers:

3

I have a message broker with some topics, and some set of applications running on it. Now I want to run a new set of the same applications (say for QA environment) on the same topics (on the same broker, if I could). What is the best way to do this. Creating a new broker and or creating a new set of topics is cumbersome, as our environments are under tight bureaucracy.

+2  A: 

AFAIK EMS does not support anything like what you suggest. There are a few options to get what you are looking for.

Having independent EMS servers would be the ideal solution. This would allow your non-production environment to have some hickups without causing problems in your production environment.

Using the same server you can have an environment-specific prefix tacked onto all the queue/topic names. There would need to be some application level setting for which prefix to use (qa, dev, test, prod, ...). This would make for pretty good isolation of the environments, but would probably not work too well if any of the environments are really heavily loaded.

For topics you can use some JMS header property and messages subscriptions to determine which environment to route them to. I would not recommend this as it would be pretty easy to screw it up and corrupt both environments.

John Meagher
+1  A: 

I'd recommend against using the same middleware servers for both production and QA at the same time (particularly message brokers) as in QA you will probably want to do load & soak tests which you don't want affecting production. As John mentions, using a separate server would be the simplest approach.

Its kinda bizarre why there's such tight bureaucracy over replicating the same set of topics in a QA environment; can't you just take a dump of the production installation of EMS?

FWIW with some message brokers, the creation of topics and queues is kinda trivial. e.g. in Apache ActiveMQ application developers choose what queue and topic names they want to use - then you connect to a broker for the right environment and it just works (though you can add security to disable certain users from creating topics/queues if you want added bureaucracy :).

As an aside; I've always found it quite comical how in enterprise environments there are quite draconian policies about what queue/topic names you are allowed to use - yet in web applications developers are free to use whatever URIs they want in their applications. After all in both cases they are just logical names - the middleware should be able to just work and support auditing either way :)

James Strachan
A: 

this requirement can be achieved by having as a qualifier in the message topics/queues or "subjects", so you can segregate the environment mode from DEV to TEST on the same server.Keep in mind that, flow of messages across environments are not recommended by using same EMS Server.

This particular requirement should be addressed in "Subject Naming Conventions", which is a classic task in SOA Architecture defining message formats, message excahange patterns and design of subjects etc.

For eg, your subject can be ..... where would be DEV or TEST or UAT etc