From d6c523c256fae973aa7f9b849a7fbca8c3807c9b Mon Sep 17 00:00:00 2001 From: doleyzi <43397300+doleyzi@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:05:02 +0800 Subject: [PATCH] [INLONG-9993][Audit] The data protocol adds an audit_version attribute (#9994) * The data protocol adds an audit_version attribute * The data protocol adds an audit_version attribute * The data protocol adds an audit_version attribute --- .../java/org/apache/inlong/common/constant/Constants.java | 3 +++ .../org/apache/inlong/common/msg/AttributeConstants.java | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/inlong-common/src/main/java/org/apache/inlong/common/constant/Constants.java b/inlong-common/src/main/java/org/apache/inlong/common/constant/Constants.java index 3aaee8238ad..766e3c4a447 100644 --- a/inlong-common/src/main/java/org/apache/inlong/common/constant/Constants.java +++ b/inlong-common/src/main/java/org/apache/inlong/common/constant/Constants.java @@ -30,4 +30,7 @@ public class Constants { public static final String DEFAULT_KAFKA_TOPIC_FORMAT = "%s.%s"; public static final String METRICS_AUDIT_PROXY_HOSTS_KEY = "metrics.audit.proxy.hosts"; + // Default audit version is -1 + public static final long DEFAULT_AUDIT_VERSION = -1; + } diff --git a/inlong-common/src/main/java/org/apache/inlong/common/msg/AttributeConstants.java b/inlong-common/src/main/java/org/apache/inlong/common/msg/AttributeConstants.java index 43922ee0651..ceaeef3054e 100644 --- a/inlong-common/src/main/java/org/apache/inlong/common/msg/AttributeConstants.java +++ b/inlong-common/src/main/java/org/apache/inlong/common/msg/AttributeConstants.java @@ -103,5 +103,8 @@ public interface AttributeConstants { // the downstream by the Bus without modification for the downstream to // calculate the end-to-end message delay; if this field does not exist in the request, // it will be added by the Bus with the current time - public static final String MSG_RPT_TIME = "rtms"; + String MSG_RPT_TIME = "rtms"; + + // Audit version is used for audit to reconciliation + String AUDIT_VERSION = "auditVersion"; }