You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by swgkg <gi...@git.apache.org> on 2014/10/09 14:36:06 UTC
[GitHub] stratos pull request: Fixes for error in publishing artifact updat...
GitHub user swgkg opened a pull request:
https://github.com/apache/stratos/pull/86
Fixes for error in publishing artifact updated event - STRATOS-791
This pull image contains the fixes for :
Error in publishing artifact updated event - STRATOS-858
Re factoring the code - STRATOS-791
Please review and merge
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gayangunarathne/stratos master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/stratos/pull/86.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #86
----
commit c7b766818a65bf2016112bf28f0c34b61e8ae614
Author: gayan <ga...@puppet.gayan.org>
Date: 2014-10-09T06:35:54Z
fixes for STRATOS-791
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] stratos pull request: Fixes for error in publishing artifact updat...
Posted by swgkg <gi...@git.apache.org>.
Github user swgkg commented on the pull request:
https://github.com/apache/stratos/pull/86#issuecomment-62505258
Hi Imesh,
Thank you for pointing this. As I see those changes are already merge with the code.Hence closing the PR.
Thanks,
Gayan
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] stratos pull request: Fixes for error in publishing artifact updat...
Posted by imesh <gi...@git.apache.org>.
Github user imesh commented on a diff in the pull request:
https://github.com/apache/stratos/pull/86#discussion_r20130930
--- Diff: components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/subscribe/TopicSubscriber.java ---
@@ -46,15 +46,14 @@
private boolean terminated = false;
private MqttCallback messageListener;
- private TopicSession topicSession;
+
private final String topicName;
private TopicHealthChecker healthChecker;
private final javax.jms.TopicSubscriber topicSubscriber = null;
private boolean subscribed;
- private final MessageProcessorChain processorChain;
- /**
+ /**
--- End diff --
Another minor indentation issue. Will you be able to correct please?
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] stratos pull request: Fixes for error in publishing artifact updat...
Posted by swgkg <gi...@git.apache.org>.
Github user swgkg closed the pull request at:
https://github.com/apache/stratos/pull/86
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] stratos pull request: Fixes for error in publishing artifact updat...
Posted by imesh <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---