This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //// This is part of the code for my medium post, https://medium.com/@samuelhutama | |
| static void RegisterOnMessageHandlerAndReceiveMessages() | |
| { | |
| var sessionHandlerOptions = new SessionHandlerOptions(ExceptionReceivedHandlerAsync) | |
| { | |
| //// Maximum number of concurrent calls to the callback ProcessMessagesAsync(), set to 1 for simplicity. | |
| //// Set it according to how many messages the application wants to process in parallel. | |
| MaxConcurrentSessions = 100, | |
| //// Indicates whether MessagePump should automatically complete the messages after returning from User Callback. |