Github user imesh commented on a diff in the pull request:

    https://github.com/apache/stratos/pull/86#discussion_r20130914
  
    --- Diff: 
components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/publish/TopicPublisher.java
 ---
    @@ -69,48 +70,49 @@
        public void publish(Object messageObj, boolean retry) {
     
                synchronized (TopicPublisher.class) {
    -                   Gson gson = new Gson();
    -                   String message = gson.toJson(messageObj);
    -                   boolean published = false;
    -                   while (!published)
    -                           try {
    -                                   mqttClient = 
MQTTConnector.getMQTTConClient();
    -
    -                                   MqttMessage mqttMSG = new 
MqttMessage(message.getBytes());
    -
    -                                   mqttMSG.setQos(QOS);
    -                                   MqttConnectOptions connOpts = new 
MqttConnectOptions();
    -                                   connOpts.setCleanSession(true);
    -                                   mqttClient.connect(connOpts);
    -                                   mqttClient.publish(topic, mqttMSG);
    -                                   mqttClient.disconnect();
    -                                   published = true;
    -                           } catch (Exception e) {
    -                                   initialized = false;
    -                                   if (log.isErrorEnabled()) {
    -                                           log.error("Error while 
publishing to the topic: " + topic, e);
    -                                   }
    -                                   if (!retry) {
    -                                           if (log.isDebugEnabled()) {
    -                                                   log.debug("Retry 
disabled for topic " + topic);
    -                                           }
    -                                           throw new RuntimeException(e);
    -                                   }
    -
    -                                   if (log.isInfoEnabled()) {
    -                                           log.info("Will try to 
re-publish in 60 sec");
    -                                   }
    -                                   try {
    -                                           Thread.sleep(60000);
    -                                   } catch (InterruptedException ignore) {
    -                                   }
    -                           }
    -                           finally {
    -
    -                           }
    -           }
    +            Gson gson = new Gson();
    --- End diff --
    
    Loos like we have an indentation issue here. Can you please correct this?
    Thanks


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to