Parameter values for the pubsub component
Select the objects and properties that are associated with the pubsub component that you want to change.
To change the connection properties, you must run mqsichangeproperties and specify the integration node name,
-b, -o, -n, and
-v parameters, in the following format:
mqsichangeproperties <integrationNodeName> -b pubsub -o <event_group>/<connector_name> -n <property_name> -v <property_value>
To
configure the built-in MQTT
broker:mqsichangeproperties <integrationNodeName> -b pubsub -o MQTTServer -n <property_name> -v <property_value>
You can also optionally specify -p.
Use these properties to complete the following tasks:
The following properties and values are valid for the pubsub component:
- The -o parameter represents the built-in MQTT broker, or the event group
and transport protocol to change.<event_group> takes one of the following values:
- OperationalEvents
- AdminEvents
- BusinessEvents
Event groups correspond to a set of valid event types. For a tabled list of the event types, see Event message architecture.
<connector_name> takes either of the following values:- MQ. WebSphere® MQ is used as the transport protocol.
- MQTT. MQTT is used as the transport protocol.
Alternatively, you can use -o MQTTServer to configure the built-in MQTT broker, as described in Configuring the built-in MQTT pub/sub broker.
- The -n parameter represents how the connection details are managed for the
event.If you specify -o MQTTServer, <property_name> takes one the following values:
- enabled. This option enables the built-in MQTT broker.
- port. This option restarts the built-in MQTT broker on the specified port.
If you specify -o <event_group>/<connector_name>, <property_name> takes one the following values:- policyUrl. This option specifies a URL location for
an MQEndpoint or MQTT operational policy. The information that is
contained in the policy defines the connection to a pub/sub broker. The URL is only validated when
an event is published, not when this value is set.
Operational policies are reusable and control properties at runtime. For more information, see Operational policy.
- enabled. This option specifies publication for the specified event type. The -v parameter then controls enabling and disabling publication.
- format. This option is valid only with MQ as the specified <connector_name>, and specifies the format of the publication. Setting the format by using the pubsub components overrides the use of set environment variables.
- The -v parameter represents the value for the option that you specified for
the -n parameter.If you specify -o MQTTServer, <property_value> takes one of the following values:
- If you specified -n enabled, then provide either true or false to start or stop the built-in MQTT broker the next time that the integration node is started.
- If you specified -n port, then provide the port number for this value.
If you specify -o <event_group>/<connector_name>, <property_value> takes one of the following values:- If you specified -n
policyUrl, then provide the location for the policy
document. The location is formed by the policy type and the name of the policy. For example, for an
MQEndpoint policy,
/apiv1/policy/MQEndpoint/example_policy.If the -v parameter is set for policyUrl with an empty string, then the default behavior for the transport is set. The following connection details describe the default connection for the selected transport protocol:
- For MQ, the WebSphere MQ queue manager that is specified on the integration node, if one was specified.
- For MQTT, the built-in MQTT broker.
- If you specified -n enabled, then provide either true or false to enable or disable publication.
- If you specified -n
format, then provide either none, string, or
an empty string:
- none sets the publication format to JMS BytesMessage, which is the equivalent of environment variable MQFMT_NONE.
- string sets the publication format to JMS TextMessage, which is the equivalent of environment variable MQFMT_STRING.
- If you provide an empty string, then the default format is used, which is JMS TextMessage.
See the mqsichangeproperties command for example usage of the pubsub component.