NServiceBus
NServiceBus copied to clipboard
It's not obvious that send/publish operations are batched and not necessarily immediate
This issue was transferred from a private repository
The Send, Publish, and Reply operations are 'Async', indicating they are doing IO and even hinting these operations are happening immediately. However, this isn't always the case and users sometimes ask if something is wrong to which we need to explain behavior and guide them to documentation.
This indicates some potential problems:
- Why are methods that 'batch' messages async when in 99.999% of cases the API doesn't have to be async? Prevent issues like missing
awaitkeyword. Only one specific options will require an async signature. In regards to publishes, there is no need to retrieve subscribers just before dispatching. - Shouldn't the operations be named in a way to indicate they are batched?