-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support send-only endpoint configuration #714
Conversation
jpalac
commented
Sep 5, 2023
•
edited by mikeminutillo
Loading
edited by mikeminutillo
- Rebase of [Spike] Support send-only endpoints #618
- Fixes Using SendOnly throws a KeyNotFoundException with Main as a key #617
|
||
class SendOnlyReceiver : IMessageReceiver | ||
{ | ||
static readonly InvalidOperationException SendOnlyEndpointException = new($"This endpoint cannot process messages because it is configured in send-only mode. Remove the '{nameof(EndpointConfiguration)}.{nameof(EndpointConfiguration.SendOnly)}' configuration or do not call '{nameof(IFunctionEndpoint)}.{nameof(IFunctionEndpoint.ProcessAtomic)}/{nameof(IFunctionEndpoint.ProcessNonAtomic)}'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we can safely have a singleton exception instance and throw it multiple times, possibly concurrently. What happens if it is thrown at one site, then thrown from a different site before the first throw is caught? What does the stack trace look like? I think it would be better to recreate this every time.
Perhaps we want to change this to make it closer to Particular/NServiceBus.AzureFunctions.Worker.ServiceBus#377