This is an automated email from the ASF dual-hosted git repository.
tmaret pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-distribution-journal.git
The following commit(s) were added to refs/heads/master by this push:
new 26bbb2c SLING-8967 - Log offset for skipped packages
26bbb2c is described below
commit 26bbb2cf0d9044f38b2c94874775464f9efc23b0
Author: tmaret <[email protected]>
AuthorDate: Tue Jan 7 15:34:21 2020 +0100
SLING-8967 - Log offset for skipped packages
---
.../journal/impl/subscriber/DistributionSubscriber.java | 8 ++++----
1 file changed, 4 insertions(+), 4 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 1b91fcb..c5e25e2 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
@@ -303,7 +303,7 @@ public class DistributionSubscriber implements
DistributionAgent {
}
private void handlePackageMessage(MessageInfo info, PackageMessage
message) {
- if (shouldEnqueue(message)) {
+ if (shouldEnqueue(info, message)) {
DistributionQueueItem queueItem =
QueueItemFactory.fromPackage(info, message, true);
enqueue(queueItem);
} else {
@@ -315,13 +315,13 @@ public class DistributionSubscriber implements
DistributionAgent {
}
}
- private boolean shouldEnqueue(PackageMessage message) {
+ private boolean shouldEnqueue(MessageInfo info, PackageMessage message) {
if (!queueNames.contains(message.getPubAgentName())) {
- LOG.info("Skipping package for Publisher agent {} (not
subscribed)", message.getPubAgentName());
+ LOG.info("Skipping package for Publisher agent {} at offset {}
(not subscribed)", message.getPubAgentName(), info.getOffset());
return false;
}
if (!pkgType.equals(message.getPkgType())) {
- LOG.warn("Skipping package with type {}", message.getPkgType());
+ LOG.warn("Skipping package with type {} at offset {}",
message.getPkgType(), info.getOffset());
return false;
}
return true;