Skip to content

chore(bus): avoid hidden queue affinity contracts#357

Merged
yordis merged 1 commit into
masterfrom
yordis/chore-message-synchronization-groups
May 14, 2026
Merged

chore(bus): avoid hidden queue affinity contracts#357
yordis merged 1 commit into
masterfrom
yordis/chore-message-synchronization-groups

Conversation

@yordis
Copy link
Copy Markdown
Member

@yordis yordis commented May 13, 2026

  • Message routing should expose its synchronization contract where every message already carries dispatch metadata.
  • Focused coverage keeps serialized worker routing stable while reducing queue-routing special cases.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Warning

Rate limit exceeded

@yordis has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 50 minutes and 27 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 645535f1-bdd0-4f7f-9f9c-69523626c787

📥 Commits

Reviewing files that changed from the base of the PR and between e93d90b and cae99bb.

📒 Files selected for processing (6)
  • src/EventStore.Core.XUnit.Tests/Bus/MultiQueuedHandlerTests.cs
  • src/EventStore.Core/Bus/MultiQueuedHandler.cs
  • src/EventStore.Core/Messages/IQueueAffineMessage.cs
  • src/EventStore.Core/Messages/StorageMessage.cs
  • src/EventStore.Core/Messages/TcpMessage.cs
  • src/EventStore.Core/Messaging/Message.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yordis/chore-message-synchronization-groups

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cursor
Copy link
Copy Markdown

cursor Bot commented May 13, 2026

PR Summary

Medium Risk
Changes core message-to-queue routing semantics by replacing the dedicated queue-affinity interface with a new Message.SynchronizationGroup contract, which could affect ordering/affinity if any messages relied on the old hashing behavior.

Overview
MultiQueuedHandler now selects a target queue using message.SynchronizationGroup?.GetHashCode() (falling back to round-robin), removing the hidden dependency on IQueueAffineMessage.

This introduces Message.SynchronizationGroup and migrates existing affinity uses (e.g. TcpMessage.TcpSend, StorageMessage.BatchLogExpiredMessages) to override/set it, deletes IQueueAffineMessage, and adds focused xUnit coverage to keep same-group messages co-located and non-group messages round-robin.

Reviewed by Cursor Bugbot for commit cae99bb. Bugbot is set up for automated code reviews on this repo. Configure here.

@yordis yordis merged commit 1a98fea into master May 14, 2026
22 checks passed
@yordis yordis deleted the yordis/chore-message-synchronization-groups branch May 14, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant