Configuring the MQTT service with IBM WebSphere MQ Explorer
Follow these instructions to configure IBM® WebSphere® MQ using IBM WebSphere MQ Explorer to run the sample IBM WebSphere MQ Telemetry clients. The steps show you how
to create an MQTT service by running
the Define sample
configuration wizard.
Before you begin
- Get a copy of IBM WebSphere MQ and create a queue manager on your own Linux® or Windows workstation. Follow the instructions in Installing IBM WebSphere MQ to obtain and install IBM WebSphere MQ. Note that you need to also select Telemetry Service and Telemetry Clients when installing. You can also modify an existing installation to add these options.
- Contact an IBM WebSphere MQ administrator and ask for administrative access to a queue manager on a server that has IBM WebSphere MQ Telemetry installed as an option. In addition to the name of the queue manager, you require at least two TCP/IP ports for MQTT and for MQTT over WebSockets. If you are planning to connect secure clients, you require at least two more ports.
MQXR_SAMPLE_QM
,
and TCP/IP port 1883 must be unused.About this task
In this task, you run the IBM WebSphere MQ Explorer Define
sample
configuration wizard to create a MQTT service to listen for MQTT V3.1 client connections on port
1883. The configuration gives everyone permission to publish and subscribe to any topic. The configuration of security and access control is minimal and is intended only for a queue manager that is on a secure network with restricted access. To run IBM WebSphere MQ and MQTT in an insecure environment, you must configure security. To configure security for IBM WebSphere MQ and MQTT, see the related links at the end of this task.
Procedure
Results
You can modify the properties of this channel, and add and delete channels in this window.
What to do next
Test the connection by running the MQTT Client Utility.
- To start the client utility, open the Telemetry folder
and click Run MQTT Client Utility twice.
Two MQTT Client Utility windows open, identical but for different client identifiers.
- Click Connect in both windows.
- Click Subscribe in both windows.
- Click Publish in either window. The results are shown in Figure 1
- Click Disconnect in both windows.