You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by qi...@apache.org on 2023/04/26 03:38:54 UTC
[eventmesh] branch master updated: fixes#3400
This is an automated email from the ASF dual-hosted git repository.
qingshanpeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh.git
The following commit(s) were added to refs/heads/master by this push:
new 6541f2d51 fixes#3400
new 23bbacb8e Merge pull request #3812 from nikam14/patch-15
6541f2d51 is described below
commit 6541f2d51f6adf6dac98aeefd6246f91b58aaaa9
Author: maheshnikam <55...@users.noreply.github.com>
AuthorDate: Mon Apr 24 17:18:34 2023 +0530
fixes#3400
---
.../runtime/core/protocol/grpc/push/WebhookPushRequest.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/push/WebhookPushRequest.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/push/WebhookPushRequest.java
index e869ea969..406e1b783 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/push/WebhookPushRequest.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/push/WebhookPushRequest.java
@@ -51,6 +51,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import java.util.Set;
import org.slf4j.Logger;
@@ -133,7 +134,6 @@ public class WebhookPushRequest extends AbstractPushRequest {
builder.setEntity(new UrlEncodedFormEntity(body, StandardCharsets.UTF_8));
- //eventMeshHTTPServer.metrics.summaryMetrics.recordPushMsg();
addToWaitingMap(this);
@@ -177,9 +177,9 @@ public class WebhookPushRequest extends AbstractPushRequest {
return response -> {
removeWaitingMap(WebhookPushRequest.this);
long cost = System.currentTimeMillis() - lastPushTime;
- //eventMeshHTTPServer.metrics.summaryMetrics.recordHTTPPushTimeCost(cost);
+
if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
- //eventMeshHTTPServer.metrics.summaryMetrics.recordHttpPushMsgFailed();
+
MESSAGE_LOGGER.info(
"message|eventMesh2client|exception|url={}|topic={}|bizSeqNo={}"
+ "|uniqueId={}|cost={}", selectedPushUrl, simpleMessage.getTopic(),
@@ -219,7 +219,7 @@ public class WebhookPushRequest extends AbstractPushRequest {
Map<String, Object> ret =
JsonUtils.parseTypeReferenceObject(content, new TypeReference<Map<String, Object>>() {
});
- Integer retCode = (Integer) ret.get("retCode");
+ Integer retCode = (Integer) Objects.requireNonNull(ret).get("retCode");
if (retCode != null && ClientRetCode.contains(retCode)) {
return ClientRetCode.get(retCode);
}
@@ -257,6 +257,6 @@ public class WebhookPushRequest extends AbstractPushRequest {
}
}
MESSAGE_LOGGER.error("No event emitters from subscriber, no message returning.");
- return Collections.EMPTY_LIST;
+ return Collections.emptyList();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org