ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexIBM MQ Telemetry / Low Latency Messaging / EveryplaceIIB 10 no monitoring events with bind_address is hostname

Post new topicReply to topic
IIB 10 no monitoring events with bind_address is hostname View previous topic :: View next topic
Author Message
john.ormerod
PostPosted: Mon May 14, 2018 7:15 am Post subject: IIB 10 no monitoring events with bind_address is hostname Reply with quote

Novice

Joined: 14 Feb 2017
Posts: 23

Hello
Windows 10 / IIB 10.0.0.11 / Eclipse paho 3-1.1.0

I have a java app that subscribes to IIB's monitoring events. It works when using JMS/MQ. I have extended it to use MQTT as an alternative.

My app receives monitoring events via MQTT when connected as 'localhost'. However, when I change bind_addresss to be the hostname, my app connects, issues subscription to topics, but never gets any monitoring events. I don't know how to determine whether the problem is with the sub or pub.

I discovered the hostname issue, when I first tried to subscribe to a remote IIB system. In order to get connected, I had to change bind_address on the remote IIB, to be the machine's hostname. After various trials and errors, I found that the problem occurs when the bind_address value is not 'localhost'.

My connection properties (from my startup config) are:
<ClientId>njams#</ClientId>
<Host>JOT420</Host>
<Port>11883</Port>
<KeepAliveInterval>30</KeepAliveInterval> <!-- seconds -->
<QoS>0</QoS>
The ClientId is appended with the topic string to ensure it is unique.

My connection code is
Code:

   protected MqttClient connectToBroker(String serverUrl, String clientId, MqttConnectOptions connOpts, String topic) {
      // Connect to Broker
      MqttClient mqttClient = null;
      try {
         mqttClient = new MqttClient(serverUrl, clientId);
         mqttClient.setCallback(new MqttEventsConsumer(mqttClient, connOpts, request, topic));
         IMqttToken token = mqttClient.connectWithResult(connOpts);
         if (token.getException() != null) {
            logger.error("Response is: exception = {}.", token.getException().toString()) ;
         }
         logger.debug("Response from Broker connection: {}.",token.getResponse().toString());
         return mqttClient;
      } catch (MqttException e) {
         logger.error(e.toString(), e);
      }catch (Exception e) {
         logger.error(e.toString(), e);
      }
      return mqttClient; // "Failed to connect to " + serverUrl;
   }


I hope someone can help me with this. I the answer is out there somewhere, I haven't found the right search terms.
Regards, John
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ Telemetry / Low Latency Messaging / EveryplaceIIB 10 no monitoring events with bind_address is hostname
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.