Closed Einarsson closed 5 years ago
Thanks for inputs @SeanFeldman!
One thing though; I havn't figured out a way to nest generics in XML comments; Take this one for example:
/// Use <see cref="RegisterMessageHandler(Func{Message,CancellationToken,Task}, MessageHandlerOptions)"/> to configure the settings of the pump.</remarks>
It says incorrect syntax if you do RegisterMessageHandler(Func{List{Message},CancellationToken,Task}
I'll look into the changes you've proposed. :) Should also be possible to avoid an unnecessary breaking change.
It says incorrect syntax if you do RegisterMessageHandler(Func{List{Message},CancellationToken,Task}
What you're doing should work. Are you on the latest of VS2017?
Should also be possible to avoid an unnecessary breaking change.
Indeed.
I'll check the commenting again, I updated VS like last month but sometimes VS do weird stuff for no apparent reason. :)
Thanks for your time! Very good inputs!
Interesting.
This works:
/// Use <see cref="RegisterBatchMessageHandler(Func{IList{Message},CancellationToken,Task}, BatchMessageHandlerOptions)"/> to configure the settings of the pump.</remarks>
This does not:
/// This handler(<see cref="Func{IList{Message}, CancellationToken, Task}"/>>) is awaited on every time a new message is received by the receiver.
It gives: CS1584 C# XML comment has syntactically incorrect cref attribute CS1658 C# Type parameter declaration must be an identifier not a type. See also error CS0081.
Appearently a known problem: https://stackoverflow.com/questions/684982/referring-to-a-generic-type-of-a-generic-type-in-c-sharp-xml-documentation/797364
Sorted out lot of proposed changes.
However issue with the XML comments still persists and are unsolvable, not sure how to proceed with that. It could work if you introduce some MessageBatch object instead of IList
The build is OK with XMLDocs, but it's failing on tests. Could you please verify those?
Ran the testa successfully yesterday. I can double check later.
The build is ok with XML comments because i havnt changed to List
Tests runnin. :)
@Einarsson great! Could you add a test to verify this is working as expected?
Also, I'm sure @nemakam 's review will be asking for setting up a longer running test app to see if this can run for longer period of time w/o any issues (a sender that sends messages and a receiver that receives batches).
Will do @SeanFeldman ! Gonna research the existing tests to setup a test in a similar fashion. :)
You will need an environment variable with connection string to the namespace with a set of predefined entities. All this is documented here.
I've added some tests that uses the subscription client and messageBatchHandler. I've tested it manually with console apps as well before where I sent 10 000 or more messages in batches of max 100.
Marked PR as [WIP]
until it's not and ready to be merged.
@Einarsson we're closing this PR given that this repo has been migrated to Azure SDK for .NET.
If you feel that you still want to pursue this feature, please open an issue in the new repo and we can discuss this further.
add registerMessageHandler on receiver clients that supports batching
This is a proposed change to add batch support to the receiver clients. RegisterMessageHandler currently only processes one message at a time. Batching it would make it easier to handle chunks of messages if you need it to optimize performance towards data sources like SQL etc.
https://github.com/Azure/azure-service-bus-dotnet/issues/582
Changes aren't 100% complete. I have only run manual tests and thus haven't written any unit tests yet. I would like to know if it is at all a viable implementation before proceeding. There might also be formatting issues and other details that might be improved and then I'll happily take the feedback and fix it when I get around to it.
TL;DR; If you like this approach, I can continue working on it with your feedback; else throw it. :)