Jump to content
We've recently updated our Privacy Statement, available here. ×

TIBCO StreamBase - dynamic values for JMS server properties

João Dessain Saraiva

Recommended Posts


I am trying to develop a solution with Tibco Streambase Studio that use dynamic values such as the hostname for the JMS server.

However I did notice this values are hardcoded in the .conf using Json format.

Is there a way to pass a dynamic value The idea is to deploy the same solution but use different messaging servers.

Thanks in advance,

Link to comment
Share on other sites

How you specify JMS server properties flexibly depends on how dynamic you want to be.

The JMS server name can be a parameter in the .sbapp -- parameter values are bound at EventFlow module instantiation time. This means you can have multiple server definitions in the com.tibco.ep.streambase.configuration.adapter HOCON file for your JMS adapters, and assign them to different instances of the adapters or different instances of the modules that reference the adapters. This means, though, that you have to know all your runtime values at application archive packaging time, which is not always possible or even desirable. (Note that StreamBase configuration files are specified using HOCON, which is not actually strictly JSON, but rather a well-defined usage of JSON with some variances.)

If you want to be able to provide, for example, different URIs for the JMS or JNDI connections but use HOCON JMS server definition, you can use substitution variable references (and defaults) in the HOCON itself, and then provide substitution variable values to the epadmin install node operation. Note that these are bound at node install time, so they can be specified at deployment time, so that's probably better than having to specify things at application packaging time.

If what you want to do is change the server definitions *after* the StreamBase engine is initialized, I don't think the current EMS/JMS adapters support that easily. There are tricky ways to instantiate StreamBase containers, and thus modules and adapters and their parameter values dynamically at just about any time at runtime, but it's, well, a bit tricky and I wouldn't necessarily recommend it as a fundamental element of the application architecture. At least when you are just starting out with StreamBase.

(This answer assumes you are using Streambase 10.4 (I think -- I may not be exactly right about the version here) or later -- prior to that StreamBase adapters for JMS used an XML based configuration syntax and did not support substitution variables in those configuration files.)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...