Other info
- Sessions enabled in queue
Recipient (full dotnet 4.6.2)
Task OnStart() {
var factory = MessagingFactory.CreateFromConnectionString(Settings.ConnectionString);
var queueClient = factory.CreateQueueClient(Settings.RecipientQueue, ReceiveMode.PeekLock);
var options = new SessionHandlerOptions()
{
AutoComplete = false,
MaxConcurrentSessions = 1
};
queueClient.RegisterSessionHandler(typeof(SessionHandler), options);
}
...
class SessionHandler : IMessageSessionAsyncHandler {
...
public async Task OnMessageAsync(MessageSession session, BrokeredMessage message)
{
await message.CompleteAsync();
}
...
}
Publisher (dotnet core 2.1):
public Task PublishAsync(string queueName, string eventName, object data)
{
var message = new Message
{
Body = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(data)),
SessionId = queueName,
ReplyToSessionId = queueName,
TimeToLive = TimeSpan.FromSeconds(30),
ReplyTo = settings.RecipientQueue
};
return new MessageSender(connection, queueName).SendAsync(message);
}
Actual Behavior
- Everything is OK when I'm using queues without SessionId and Session disabled
- User errors in Azure Portal Metrics when using queues with SessionId and Session enabled
- Exception: Exception thrown: 'System.ServiceModel.FaultException
1' in Microsoft.ServiceBus.dll ("A
timeout has occurred during the operation. e786d05b-<numers>-404b-917b-<numbers>5b_G6"). Exception thrown: 'System.ServiceModel.FaultException
1' in Microsoft.ServiceBus.dll ("A timeout has occurred during the operation. e786d05b--404b-917b-5b_G6") - Exception: Exception thrown: 'System.ServiceModel.FaultException
1' in Microsoft.ServiceBus.dll ("A
timeout has occurred during the operation. TrackingId:<numbers>-3b64-4dc1-b9e5-<number>, SystemTracker:<message-bus-name>:queue:<queue-name>~<numbers>, Timestamp:<date-time>"). Exception thrown: 'System.ServiceModel.FaultException
1'
in Microsoft.ServiceBus.dll
Expected Behavior
- Sessions works and no reason for errors in monitor