v1.0.38 - #101
Conversation
…ed outbox messages
…n instead of re-joining it
Feature/outbox wakeup signal
Reviewer's GuideVersion 1.0.38 reduces event-processing latency with wake-aware inbox/outbox polling and an optional post-commit Dapr outbox nudge, while refining outbox telemetry to isolate worker publication traces and retain causation through links. Sequence diagram for post-commit outbox wakeupsequenceDiagram
participant UOW as UnitOfWork
participant Store as EfCoreOutboxStore
participant Coordinator as OutboxWakeupCoordinator
participant Notifier as DaprOutboxWakeupNotifier
participant Dapr as DaprPubSub
participant Poller as OutboxBackgroundService
participant Processor as OutboxProcessor
UOW->>Store: StoreAsync
Store->>Coordinator: OnOutboxMessageStored
Coordinator->>UOW: OnCompleted
UOW->>Coordinator: CommitAsync completes
Coordinator-)Notifier: NotifyAsync
Notifier-)Dapr: PublishEventAsync
Dapr-)Poller: OutboxWakeupEvent
Poller->>Poller: WaitAsync returns early
Poller->>Processor: ProcessOutboxMessagesAsync
Sequence diagram for wake-aware inbox deliverysequenceDiagram
participant Endpoint as EventsController
participant UOW as UnitOfWork
participant Signal as InboxWakeSignal
participant Poller as InboxBackgroundService
participant Processor as InboxProcessor
Endpoint->>UOW: CommitAsync
Endpoint->>Signal: Signal
Signal-->>Poller: WaitAsync returns early
Poller->>Processor: ProcessInboxMessagesAsync
Sequence diagram for isolated outbox publication tracingsequenceDiagram
participant Poller as OutboxProcessor
participant Activity as Outbox.Process span
participant Origin as Origin transition trace
participant EventBus as EventBus
Poller->>Poller: TryParseOrigin
Poller->>Activity: StartActivity
Activity-->>Origin: causation link
Activity-->>Poller: worker publication episode
Poller->>EventBus: PublishEnvelopeAsync
EventBus-->>Activity: publish result
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="framework/src/BBT.Aether.Infrastructure/BBT/Aether/Events/DaprOutboxWakeupNotifier.cs" line_range="11-23" />
<code_context>
+/// Publishes <see cref="OutboxWakeupEvent"/> straight to the configured pub/sub component,
+/// bypassing the outbox by design (the nudge must not create the work it announces).
+/// </summary>
+public sealed class DaprOutboxWakeupNotifier(
+ DaprClient daprClient,
+ ITopicNameStrategy topicNameStrategy,
+ AetherEventBusOptions eventBusOptions) : IOutboxWakeupNotifier
+{
+ private readonly string _topic = topicNameStrategy.GetTopicName(typeof(OutboxWakeupEvent));
+
+ public Task NotifyAsync(CancellationToken cancellationToken = default)
+ => daprClient.PublishEventAsync(
+ eventBusOptions.PubSubName,
+ _topic,
+ new OutboxWakeupEvent(),
+ cancellationToken);
+}
</code_context>
<issue_to_address>
**issue (broader_impact):** The notifier publishes OutboxWakeupEvent, but the framework registers no handler, subscription endpoint, or callback that converts that event into IPollingWakeSignal<IOutboxProcessor>. Consequently, the outbox background service is never woken by the published nudge and continues waiting for its normal polling interval.
**Triggers:** When outbox wakeup is enabled and the outbox processor is expected to run in another process or receive the Dapr pub/sub nudge.
**Suggested fix:** Register a subscription/handler for OutboxWakeupEvent that resolves IPollingWakeSignal<IOutboxProcessor> and calls Signal(), or provide an equivalent Dapr delivery endpoint.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: framework/src/BBT.Aether.Infrastructure/BBT/Aether/Events/DaprOutboxWakeupNotifier.cs:23
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| public sealed class DaprOutboxWakeupNotifier( | ||
| DaprClient daprClient, | ||
| ITopicNameStrategy topicNameStrategy, | ||
| AetherEventBusOptions eventBusOptions) : IOutboxWakeupNotifier | ||
| { | ||
| private readonly string _topic = topicNameStrategy.GetTopicName(typeof(OutboxWakeupEvent)); | ||
|
|
||
| public Task NotifyAsync(CancellationToken cancellationToken = default) | ||
| => daprClient.PublishEventAsync( | ||
| eventBusOptions.PubSubName, | ||
| _topic, | ||
| new OutboxWakeupEvent(), | ||
| cancellationToken); |
There was a problem hiding this comment.
issue (broader_impact): The notifier publishes OutboxWakeupEvent, but the framework registers no handler, subscription endpoint, or callback that converts that event into IPollingWakeSignal. Consequently, the outbox background service is never woken by the published nudge and continues waiting for its normal polling interval.
Triggers: When outbox wakeup is enabled and the outbox processor is expected to run in another process or receive the Dapr pub/sub nudge.
Suggested fix: Register a subscription/handler for OutboxWakeupEvent that resolves IPollingWakeSignal and calls Signal(), or provide an equivalent Dapr delivery endpoint.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 19 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|



Summary by Sourcery
Reduce event-processing latency with best-effort wakeup signals while preserving polling reliability and correct trace boundaries.
New Features:
Bug Fixes:
Enhancements:
Tests: