You can try this:
Put this in the properties file:
<property>
<name>dt.application.TelecomDemoV2.operator.
CDRGeoQueryResult.topic</name>
<value>CDRGeoQueryResult-${dt.attr.APPLICATION_NAME}</value>
</property>
Then launch your application in dtcli with -D dt.attr.APPLICATION_NAME=xyz,
or launch using REST API with dt.attr.APPLICATION_NAME set in the POST
payload.
David
On Fri, Jan 8, 2016 at 12:28 PM, Bright Chen <[email protected]> wrote:
> Hi,
> is possible to use attributes/variable in application's properties file?
>
> For example the configuration of TelecomDemo which configure the topic for
> dimension query result as following:
> <property>
>
> <name>dt.application.TelecomDemoV2.operator.CDRGeoQueryResult.topic</name>
> <value>CDRGeoQueryResult</value>
> </property>
>
> Could I change it to some like following
> <property>
>
> <name>dt.application.TelecomDemoV2.operator.CDRGeoQueryResult.topic</name>
> <value>CDRGeoQueryResult-${appName}</value>
> </property>
>
> And I expected result is that there are two instances( say one name is
> “TelecomDemoV2”, another is “TelecomDemoV21”) of this application run in
> same gateway,
> And they will use different topics "CDRGeoQueryResult-TelecomDemoV2” and
> "CDRGeoQueryResult-TelecomDemoV21”
>
> thanks
> Bright