Creating policies by using the command line

Create an XML file outside of IBM® Integration Bus to use as an MQEndpoint, MQTTSubscribe, MQTTPublish, or workload management policy document.

About this task

You can create all the policy types that are described in Operational policy.

Policy documents can be created through the following IBM Integration Bus interfaces:

However, if you have no preexisting policy document, you can also manually create an XML file outside of IBM Integration Bus. You might want to create your policy document in this way if you are not using message flow nodes to generate your policies; for example, if you require an MQTT policy to connect to an external MQTT server for publish/subscribe.

A sample workload management policy XML file is provided at the following location:

  • Windows platforminstall_dir\server\sample\Policy\WorkloadManagement_Policy.xml
  • Linux platforminstall_dir/server/sample/Policy/WorkloadManagement_Policy.xml
You can view these examples in the topic for the specific policy type that is listed in Operational policy. You can use the sample XML files as templates to create your own policy documents.

To create a policy, complete the following steps.


  1. In a text editor, create your policy document, and save as an XML file.
  2. Open the command line, and run the mqsicreatepolicy command.
    For example, to create an MQEndpoint node policy:
    mqsicreatepolicy IBNODE -t MQEndpoint -l mq_policy -f my_policy.xml
    Your policy is now available in the Integration Registry.


You can now use your policy, and configure it.