Replies: 1 comment
-
|
Erroneously posted this here rather than in Issues - opened a Feature Request and closing this discussions as duplicate. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm evaluating Wolverine 5.0 for an inter-jurisdictional messaging system where messages flow through RabbitMQ but must ultimately be dispatched to downstream peers, each over its own single TCP socket connection using a request/acknowledgement pattern.
The Use Case
Additionally, I have multiple priority queues feeding this single TCP peer, and I need to implement weighted round-robin consumption to prevent starvation of lower-priority messages. This requires fine-grained control over when each listener is active.
What I Found in Wolverine
Wolverine has excellent reactive pause mechanisms:
AndPauseProcessing()triggered by exceptionsHowever, I couldn't find a public API to proactively pause/resume a specific listener endpoint from application code — something like:
The internal infrastructure appears to exist —
ListeningAgent,IAgentwithStartAsync/StopAsync,AgentStatuswith aPausedstate — but there doesn't seem to be a public surface to invoke this from application code.This Is a Cross-Framework Gap
I've investigated competing frameworks and found the same gap exists elsewhere:
NServiceBus (as of April 2024)
LimitMessageProcessingConcurrencyTowon't allow less than 1, and admitted "I'm not sure if that's possible OOTB."MassTransit
ConnectReceiveEndpointviaIReceiveEndpointConnectorto get a handle you can start/stop.StopAsyncremoves the endpoint from the host entirely — it's not a pause, it's a disconnect. The documentation explicitly states: "Once removed, the endpoint cannot be restarted using the ReceiveEndpoint property directly."The Common Thread
All three frameworks assume the broker-to-handler path should be fully managed by the framework. But real-world scenarios involving:
...don't fit that model cleanly. This appears to be a gap across the .NET messaging ecosystem.
Workarounds I'm Considering
AndPauseProcessing()— feels like a hackManualResetEventSlim— crude and wastes a threadIMessageBus.InvokeAsync()— loses the benefits of Wolverine's listener managementProposed Feature
A first-class API on
IWolverineRuntime(or similar) to:This would enable scenarios like:
Wolverine has an opportunity to lead here since the internal infrastructure (
ListeningAgent,IAgent,AgentStatus.Paused) already appears to support this — it's just not exposed publicly.Happy to provide more detail on the use case or discuss alternative approaches. Thanks for considering!
Beta Was this translation helpful? Give feedback.
All reactions