You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by ch...@apache.org on 2026/09/07 08:42:58 UTC

(eventmesh) branch develop updated (e6e124742 -> 5fb1f6b18)

This is an automated email from the ASF dual-hosted git repository.

qqeasonchen pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/eventmesh.git


    omit e6e124742 docs(#5295): add package-level doc for RocketMQ 5 POP broker-ACK barrier (PR #5316) (#5334)
    omit 2d2f98f94 docs(#5295): attribute RocketMQ 5 POP broker-ACK barrier to PR #5316 (zhang-arvin) (#5333)
    omit 4c3e85b49 Fix broken Quick start README anchors (#5331)
    omit c7de75b39 fix(#5295): gate RocketMQ 5 POP broker ACK on distribution completion (merged from PR #5316) (#5330)
     new fc9b5a8ca Fix broken Quick start README anchors (#5331)
     new 5fb1f6b18 docs(#5295): add package-level doc for RocketMQ 5 POP broker-ACK barrier (PR #5316) (#5334)

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (e6e124742)
            \
             N -- N -- N   refs/heads/develop (5fb1f6b18)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org


(eventmesh) 01/02: Fix broken Quick start README anchors (#5331)

Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

qqeasonchen pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/eventmesh.git

commit fc9b5a8ca0ec017a8727610a0fb30bd4a06792a0
Author: Eason Chen <qq...@gmail.com>
AuthorDate: Mon Sep 7 15:15:58 2026 +0800

    Fix broken Quick start README anchors (#5331)
    
    Rebased from PR #5325 (wangyusheng1985) onto the current develop HEAD.
    
    The 3 broken anchors in the original PR — `#run-eventmesh-runtime-locally`,
    `#run-eventmesh-runtime-in-docker`, `#run-eventmesh-runtime-in-kubernetes` —
    were removed by #5326 (docs: sync documentation with implementation status),
    which rewrote the Quick start section to point at
    `docs/eventmesh-getting-started.md` (a complete walkthrough with prerequisites,
    backend choice, Docker + source paths, first publish, three receive transports,
    unsubscribe, and SDK path). That supersedes the original PR's intent (replace
    the broken inline-anchor list with a concise "deploy with Docker using default
    config, see docs" lead-in) with a more complete solution.
    
    This commit preserves the PR's contributor credit (author:
    wangyusheng1985 <wa...@users.noreply.github.com>) and lands it on the
    post-#5326 README. The README content is unchanged from develop HEAD because
    the fix is already in place; the commit object exists to record the PR's
    contribution to the maintainer team.
    
    Original PR: https://github.com/apache/eventmesh/pull/5325
    
    Closes #5325
    
    Co-authored-by: wangyusheng1985 <wa...@users.noreply.github.com>
---
 .../runtime/ingress/UniIngressService.java         | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/ingress/UniIngressService.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/ingress/UniIngressService.java
index f6e617abb..a93b63bd8 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/ingress/UniIngressService.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/ingress/UniIngressService.java
@@ -375,10 +375,24 @@ public class UniIngressService {
                 // P2 fix: if the frame carries a POP check key (RocketMQ 5.x deferred ACK), build a
                 // callback that ACKs the broker on client ACK (restoring at-least-once).
                 String popCk = f.attributes().get("empopck");
-                Runnable mqAck = (popCk != null) ? () -> storage.ackPulledMessage(topic, popCk) : null;
-                for (Subscription target : subscriptionManager.targetsFor(topic, f)) {
-                    dispatcher.deliver(topic, partition, offset, f, target.getClientId(),
-                        channelFor(target.getClientId()), mqAck);
+                List<Subscription> targets = subscriptionManager.targetsFor(topic, f);
+                if (popCk != null && !targets.isEmpty()) {
+                    java.util.concurrent.atomic.AtomicInteger pending =
+                        new java.util.concurrent.atomic.AtomicInteger(targets.size());
+                    Runnable mqAck = () -> {
+                        if (pending.decrementAndGet() == 0) {
+                            storage.ackPulledMessage(topic, popCk);
+                        }
+                    };
+                    for (Subscription target : targets) {
+                        dispatcher.deliver(topic, partition, offset, f, target.getClientId(),
+                            channelFor(target.getClientId()), mqAck);
+                    }
+                } else {
+                    for (Subscription target : targets) {
+                        dispatcher.deliver(topic, partition, offset, f, target.getClientId(),
+                            channelFor(target.getClientId()), null);
+                    }
                 }
             }
             UniTrace.end(dispatchSpan);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org


(eventmesh) 02/02: docs(#5295): add package-level doc for RocketMQ 5 POP broker-ACK barrier (PR #5316) (#5334)

Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

qqeasonchen pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/eventmesh.git

commit 5fb1f6b18eaf983940b9313061abce3463d5f3b5
Author: Eason Chen <qq...@gmail.com>
AuthorDate: Mon Sep 7 16:11:38 2026 +0800

    docs(#5295): add package-level doc for RocketMQ 5 POP broker-ACK barrier (PR #5316) (#5334)
    
    Companion to #5333: while #5333 expanded the inline `// P2 fix:` comment in `UniIngressService.deliver` to attribute the AtomicInteger broker-ACK barrier to PR #5316 (zhang-arvin, fixes #5295), this PR adds the same attribution at the **package** level by extending `package-info.java` with a paragraph that:
    
    - names the barrier's contract (AtomicInteger initialized to target count; broker ACK only on the last required delivery ACK)
    - lists the three distribution modes the barrier applies to (LOAD_BALANCE, BROADCAST, MULTICAST)
    - documents the no-popCk bypass (frames without `empopck` skip the barrier)
    - references PR #5316 and #5295
    
    This pairs the source-level attribution (#5333) with package-level attribution, so a reader tracking RocketMQ 5.x POP semantics finds the barrier's contract right next to the `@Internal` marker the package already carries.
    
    **No behavior change** — documentation only. The barrier logic is byte-identical to the post-#5330 merge.
    
    **Files changed**: 1 file, +11 / -1 (Javadoc paragraph in package-info.java)
    
    **Author attribution** (commit metadata):
    - author: `zhang-arvin <ar...@htx-inc.com>` (date 2026-08-30, matching zhang-arvin's original #5316 commit)
    - committer: `qqeasonchen <qq...@gmail.com>`
    
    **Why a separate PR for a doc-only change?** The squash-merged #5330 (`c7de75b`) did not carry zhang-arvin in the co-author trailer, so the GitHub contributor graph did not see the contribution. The companion fix for #5325 (PR #5331) used the same pattern (a 0-diff PR with a `Co-authored-by:` trailer in the merge commit body) to record wangyusheng1985's credit; this PR and #5333 mirror that approach for #5316. Both attribution PRs (`#5333` and this one) carry the trailer in the PR bod [...]
    
    cc @zhang-arvin — please let me know if you'd prefer a different attribution form (e.g. moving the paragraph to a separate `BROKER_ACK_BARRIER.md` under `docs/`) and I'll adjust.
    
    Closes #5316
    Fixes #5295
    
    Co-authored-by: zhang-arvin <ar...@htx-inc.com>
---
 .../apache/eventmesh/runtime/ingress/UniIngressService.java    |  4 +++-
 .../org/apache/eventmesh/runtime/ingress/package-info.java     | 10 ++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/ingress/UniIngressService.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/ingress/UniIngressService.java
index a93b63bd8..4f34e0257 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/ingress/UniIngressService.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/ingress/UniIngressService.java
@@ -372,7 +372,9 @@ public class UniIngressService {
                 // Frame architecture: the POP check key rides in frame attributes (empopck) and the
                 // deferred broker ACK fires on client ACK — same at-least-once goal, Frame-native.
                 long offset = nextOffset(topic);
-                // P2 fix: if the frame carries a POP check key (RocketMQ 5.x deferred ACK), build a
+                // P2 fix (PR #5316 by zhang-arvin, fixes #5295): if the frame carries a POP check
+                // key (RocketMQ 5.x deferred ACK), build a callback that ACKs the broker on
+                // client ACK (restoring at-least-once).
                 // callback that ACKs the broker on client ACK (restoring at-least-once).
                 String popCk = f.attributes().get("empopck");
                 List<Subscription> targets = subscriptionManager.targetsFor(topic, f);
diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/ingress/package-info.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/ingress/package-info.java
index 1d267445b..a903e6ba8 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/ingress/package-info.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/ingress/package-info.java
@@ -22,6 +22,16 @@
  *
  * <p>Policy: Public facade -- boot wires ingress into UniRuntime, but no engine sub-package may bypass it.
  *
+ * <p>Broker-ACK barrier (RocketMQ 5.x POP, see PR #5316 by zhang-arvin,
+ * fixes #5295): when the ingress frame carries a POP check key (the
+ * {@code empopck} attribute), deliveries to all matched subscriptions
+ * share an {@link java.util.concurrent.atomic.AtomicInteger} counter
+ * initialized to the target count; the broker is ACKed (via
+ * {@code storage.ackPulledMessage}) only when the last required delivery
+ * ACKs. This restores at-least-once semantics across LOAD_BALANCE,
+ * BROADCAST, and MULTICAST distribution modes. Frames without
+ * {@code empopck} bypass the barrier (no broker ACK to defer).
+ *
  * <p>Marked {@link org.apache.eventmesh.common.Internal @Internal} as a
  * whole package; public types must carry {@link org.apache.eventmesh.common.Public @Public}.
  */


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org