In V10 of Integration Bus there are three methods of updating the additional instances on a given flow
- Updating the bar file before deployment either in the toolkit or by applying bar-overrides
- Using a Workload Management Policy
- Using the java Integration API
In the production of the performance reports, we gradually scale up the number of instances on a given flow to try and get 100% utilisation. To perform the updates to the additional instances we use a small java application which uses the integration API to adjust the additional instances on a given integration server. Recently we have had a number of requests requesting further information on this tool. As a result of these requests we would like to provide you with a simple tool which can be used from the command line to increase the number of additional instances on a given Application / RestAPI/ message flow.
This tool requires the common set of jars that are required to run a Java Integration API Application
- IntegrationAPI.jar
- jetty-io.jar
- jetty-util.jar
- websocket-api.jar
- websocket-client.jar
- websocket-common.jar
The help provides information on the various ways the tool can be used:
Mandatory command options are:
 i=localhost p=port n=additionalInstance [s=server {[a=application] [m=messageflow] | |r=RestAPI]]
Where:
 localhost is the host name where the broker is running
 port is the port number for the listener on the queue manager for the broker
 additionalInstances are the number of additional instances to set for each matching message flow
 server is the server to update
 application is the application name to update
 messageflow is the message flow name to update
 restAPI is the RestAPI name to update
 Example is : hursley.performance.tools.SetAdditionalInstances i=localhost p=2414 n=10
 Example is : hursley.performance.tools.SetAdditionalInstances i=localhost p=2414 n=10 s=MyServer
 Example is : hursley.performance.tools.SetAdditionalInstances i=localhost p=2414 n=10 s=MyServer m=MyMessageFlow
 Example is : hursley.performance.tools.SetAdditionalInstances i=localhost p=2414 n=10 s=MyServer a=MyApplication
 Example is : hursley.performance.tools.SetAdditionalInstances i=localhost p=2414 n=10 s=MyServer a=MyApplication m=MyMessageFlow
 Example is : hursley.performance.tools.SetAdditionalInstances i=localhost p=2414 n=10 s=MyServer a=MyRestAPI
Below is an example of using this command:
java -cp IntegrationAPI.jar:SetAdditionalInstances.jar:jetty-io.jar:jetty-util.jar:websocket-api.jar:websocket-client.jar:websocket-common.jar hursley.performance.tools.SetAdditionalInstances i=localhost p=4414 n=16 s=Test
Output:
i=localhost
 p=4414
 n=16
 s=Test
 Connecting to broker at localhost=localhost, port=4414
 Connected
 IntegrationNode=TESTNODE_convery
 -Skipping ServerName=default, is running=false
 -Skipping ServerName=CallableFLowTutorial, is running=false
 -Skipping ServerName=PreProd, is running=false
 -Skipping ServerName=DevTest, is running=false
 -ServerName=Test , is running=true
 –No MessageFlows found for this ExecutionGroup
 –No RestAPIs found for this ExecutionGroup
 –Application=DemoApplication-Local–MessageFlowName=Demo_Local , AdditionalInstances=0 , is running=true
 —Setting AdditionalInstances=16
 —New AdditionalInstances=16
Flows changed =1
 Flows not changed=0
 Completed
Connected
To download this tool please see link below – SetAdditionalInstances.jar