You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cs...@apache.org on 2020/11/25 11:13:41 UTC
[sling-org-apache-sling-distribution-journal] branch master updated
(0284693 -> f4764ac)
This is an automated email from the ASF dual-hosted git repository.
cschneider pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-distribution-journal.git.
from 0284693 SLING-9742 - PubQueue#getEntry throws when provided an illegal arguments
new 08ba7b1 Use slf4j formatting instead for String.format
new f4764ac SKYOPS-9772 - Makes sure events and messages are sent event when there is an exception
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../impl/publisher/PackageDistributedNotifier.java | 16 ++++++++++++----
.../journal/impl/subscriber/DistributionSubscriber.java | 4 +---
2 files changed, 13 insertions(+), 7 deletions(-)
[sling-org-apache-sling-distribution-journal] 01/02: Use slf4j
formatting instead for String.format
Posted by cs...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
cschneider pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-distribution-journal.git
commit 08ba7b1e2a0c6b1f8365e11596ee2e4ecf677fb1
Author: Christian Schneider <cs...@adobe.com>
AuthorDate: Wed Nov 25 12:07:42 2020 +0100
Use slf4j formatting instead for String.format
---
.../distribution/journal/impl/subscriber/DistributionSubscriber.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/sling/distribution/journal/impl/subscriber/DistributionSubscriber.java b/src/main/java/org/apache/sling/distribution/journal/impl/subscriber/DistributionSubscriber.java
index 8aac747..7d14535 100644
--- a/src/main/java/org/apache/sling/distribution/journal/impl/subscriber/DistributionSubscriber.java
+++ b/src/main/java/org/apache/sling/distribution/journal/impl/subscriber/DistributionSubscriber.java
@@ -211,10 +211,8 @@ public class DistributionSubscriber {
Thread.currentThread().interrupt();
LOG.info("Join interrupted");
}
- String msg = String.format(
- "Stopped Subscriber agent %s, subscribed to Publisher agent names %s with package builder %s",
+ LOG.info("Stopped Subscriber agent {}, subscribed to Publisher agent names {} with package builder {}",
subAgentName, queueNames, pkgType);
- LOG.info(msg);
}
public DistributionAgentState getState() {
[sling-org-apache-sling-distribution-journal] 02/02: SKYOPS-9772 -
Makes sure events and messages are sent event when there is an exception
Posted by cs...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
cschneider pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-distribution-journal.git
commit f4764ac482aa2fd99541eef737d2bc102a809099
Author: Christian Schneider <cs...@adobe.com>
AuthorDate: Wed Nov 25 12:12:43 2020 +0100
SKYOPS-9772 - Makes sure events and messages are sent event when there
is an exception
---
.../impl/publisher/PackageDistributedNotifier.java | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/sling/distribution/journal/impl/publisher/PackageDistributedNotifier.java b/src/main/java/org/apache/sling/distribution/journal/impl/publisher/PackageDistributedNotifier.java
index d92343b..07eee83 100644
--- a/src/main/java/org/apache/sling/distribution/journal/impl/publisher/PackageDistributedNotifier.java
+++ b/src/main/java/org/apache/sling/distribution/journal/impl/publisher/PackageDistributedNotifier.java
@@ -108,8 +108,12 @@ public class PackageDistributedNotifier implements TopologyChangeHandler {
}
private void sendMsg(String pubAgentName, DistributionQueueItem queueItem) {
- PackageDistributedMessage msg = createDistributedMessage(pubAgentName, queueItem);
- sender.accept(msg);
+ try {
+ PackageDistributedMessage msg = createDistributedMessage(pubAgentName, queueItem);
+ sender.accept(msg);
+ } catch (Exception e) {
+ LOG.warn("Exception when sending package distributed message for pub agent {} queue item {}", pubAgentName, queueItem.getPackageId(), e);
+ }
}
private PackageDistributedMessage createDistributedMessage(String pubAgentName, DistributionQueueItem queueItem) {
@@ -123,7 +127,11 @@ public class PackageDistributedNotifier implements TopologyChangeHandler {
}
private void sendEvt(String pubAgentName, DistributionQueueItem queueItem) {
- Event distributed = DistributionEvent.eventPackageDistributed(queueItem, pubAgentName);
- eventAdmin.sendEvent(distributed);
+ try {
+ Event distributed = DistributionEvent.eventPackageDistributed(queueItem, pubAgentName);
+ eventAdmin.sendEvent(distributed);
+ } catch (Exception e) {
+ LOG.warn("Exception when sending package distributed event for pub agent {} queue item {}", pubAgentName, queueItem.getPackageId(), e);
+ }
}
}