Skip to content

Instantly share code, notes, and snippets.

View samuelalvin's full-sized avatar

samuelalvin

View GitHub Profile
@samuelalvin
samuelalvin / Program.cs
Last active October 20, 2018 08:46
.NET Core Azure Service Bus - Part of receiver code for Session Enabled Subscription
//// 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.