fix: multicast event handler silently drops events when no aggregates found#25
Draft
fix: multicast event handler silently drops events when no aggregates found#25
Conversation
Agent-Logs-Url: https://github.com/stijnvanbael/prefab/sessions/98fa672b-b767-4a0d-b2a3-1c12c01822a8 Co-authored-by: stijnvanbael <1050148+stijnvanbael@users.noreply.github.com>
…l fast) Agent-Logs-Url: https://github.com/stijnvanbael/prefab/sessions/98fa672b-b767-4a0d-b2a3-1c12c01822a8 Co-authored-by: stijnvanbael <1050148+stijnvanbael@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix build failure on main branch
fix: multicast event handler silently drops events when no aggregates found
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In pub/sub systems, messages from different topics have no guaranteed delivery order. This caused
ChannelSummary.onUserSubscribedto silently discard subscription events that arrived before the correspondingChannelCreatedhad been processed —findByChannelreturned empty, the handler did nothing, and the message was ACK'd and lost.Root cause
MulticastEventHandlerWritergenerated code that treated an empty query result as a no-op:This is inconsistent with
ByReferenceEventHandlerWriter, which uses.orElseThrow()and therefore triggers the retry mechanism on missing entities.Fix
Fail fast on empty results so
PubSubUtil's retry template re-delivers the message until the target aggregate exists:With default config (5 retries, 1 s initial backoff), the out-of-order event is retried within the first second — well within the test's 30 s window — and succeeds once
ChannelCreatedhas been processed.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
packages.confluent.io/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.14/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.14/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.14 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.14/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/prefab/prefab org.codehaus.plexus.classworlds.launcher.Launcher compile -pl annotation-processor -am --no-transfer-progress -q resources/pubsub/single/User.jav/home/REDACTED/work/prefab/prefab/pubsub/src/test/resources/pubsub--noprofile resources/pubsubgit resources/pubsubpush resources/pubsub-v resources/pubsuborigin(dns block)/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.14/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.14/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.14 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.14/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/prefab/prefab org.codehaus.plexus.classworlds.launcher.Launcher compile -pl annotation-processor --no-transfer-progress -q --global nverter.java er.java nverter.java(dns block)/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.14/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.14/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.14 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.14/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/prefab/prefab org.codehaus.plexus.classworlds.launcher.Launcher -f pom.xml -B -V -e -Dfindbugs.skip -Dcheckstyle.skip -Dpmd.skip=true -Dspotbugs.skip -Denforcer.skip -Dmaven.javadoc.skip(dns block)If you need me to access, download, or install something from one of these locations, you can either: