Paul Croarkin
Paul Croarkin

Reputation: 14675

JMS Development Best Practice

In production we have multiple containers deployed and any one can be a consumer of one JMS queue. In our development environment, we have multiple developers each with a container that will potentially consume messages. When a developer wants to test something related to JMS by putting something on the queue, though, the message is often consumed by someone else which can be be a time sink.

We use the same build files for every environment. We do not want to accidentally deploy something to an upper environment that is meant strictly for the development environment.

What is a best practice in handling something like this that will not involve build tokens, etc or building differently for different environments?

We currently have the developer ask the other developers to comment out the consuming code, but this is a risk as the commented out code could accidentally get checked in.

One potential way would be to store a property in the database that would change from environment to environment.

How have you handled this?

Upvotes: 2

Views: 1196

Answers (1)

Paul Sanwald
Paul Sanwald

Reputation: 11349

The way I've seen this done is for each developer to have their own topic, which is specific to their local dev environment. This depends on the developer having some control over the producer, obviously, not sure if this is viable for you.

You don't need build tokens to do this, but tokens do make things a lot nicer for local setup/configuration. I am quite surprised that you are able to use the same build files with no tokenization across every environment, I don't think I've ever worked on such a system.

Upvotes: 2

Related Questions