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.
Configuration changes to the built-in MQTT broker require a restart of the integration node to
take effect.
If you specify
-o
<event_group>/<connector_name>,
<property_name> takes one the following values:
- 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.