App Connect

App Connect

Join this online user group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only

Updating Additional Instance in IIB V10 

Fri July 10, 2020 08:48 AM

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

7 comments on"Updating Additional Instance in IIB V10"

  1. sudheer November 18, 2019

    hi,

    Can you use below command to increase instance in iib 10.

    mqsichangeproperties -e -o AllMessageFlows -n additionalInstance -v 4

    And also one more question that how to increase instance to only msgflow.

    Reply (Edit)
    • BenThompsonIBM November 19, 2019

      Hi Sudheer

      You can use the command: mqsichangeproperties -e -o AllMessageFlows -n additionalInstances -v 4

      This will recursively change the additionalInstances property for each deployed message flow. If the additionalInstances value is higher than the currently assigned threads, then over time if traffic coming in to a flow dictates, IIB may start using the higher number of threads. A more normal behaviour would be to tune specific message flows to use particular numbers of threads. You would typically do this through using a WorkloadManagement policy, or by setting an override in the BAR file at deployment time, or if doing this after deployment using the CMP API. So, whilst the command above should work, I would not encourage you to use it to globally change settings for all your flows in this way.

      Cheers,
      Ben

      Reply (Edit)
  2. Ivan November 14, 2018

    Hi, you write:
    port is the port number for the listener on the queue manager for the broker
    but in example use port 4414 – http listener of broker in ibus 10,
    so we must use port of broker http listener?
    thanks

    Reply (Edit)
    • BenThompsonIBM January 25, 2019

      Hi,

      Thank you very much for your comment:- you correctly point out a problem with the help text of the utility provided.
      The port number which you should use is the web administration port for your integration node, which by default will be 4414.
      In case you’re interested … the reason why this mistake was made in the help text relates to the history of the API which is being used by the tool.

      In IBM Integration Bus version 9, you could connect to a remote integration node using the Java CMP API which provided a class MQBrokerConnectionParameters, which required, the hostname of the computer where the remote integration node, the port of its WMQ listener, and the name of the queue manager associated with the node. You can see an example of this code in the IIBv9 Knowledge Center: https://www.ibm.com/support/knowledgecenter/en/SSMKHH_9.0.0/com.ibm.etools.mft.doc/be43130_.htm

      In IBM Integration Bus version 10, a new interface for connection to a remote integration node was provided in the Java CMP API called IntegrationNodeConnectionParameters. This interface requires the hostname of the computer hosting the remote integration node and its web administration port. You can see an example of this code in the IIBv10 Knowledge Center: https://www.ibm.com/support/knowledgecenter/en/SSMKHH_10.0.0/com.ibm.etools.mft.doc/be43130_.htm

      So – apologies for any confusion … you should use the web admin port like in the examples.

      Cheers,
      Ben

      Reply (Edit)
  3. Vicki October 10, 2017

    Is it possible to add a userid and password parameter. HTTP error code was -1

    Reply (Edit)
  4. IBM_Rob September 20, 2017

    This is something we may do in the future. The original reason we didn’t was to prevent internal configurable parameters being adjusted which would affect the result. This could have result in extra support calls due to incorrect diagnosis.

    Rob

    Reply (Edit)
  5. drichards September 19, 2017

    Is it possible to share a github repo rather than a JAR?

    Reply (Edit)




Statistics
0 Favorited
27 Views
1 Files
0 Shares
5 Downloads
Attachment(s)
zip file
SetAdditionalInstances.jar_.zip   5 KB   1 version
Uploaded - Fri July 10, 2020
Global message icon