/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/Transports/MassTransit.Azure.ServiceBus.Core/AzureServiceBusTransport/Defaults.cs
51 строка
2 KB
Chris Patterson
Fixed Azure Service Bus exception stack trace exceeding header length issue
19 фев 2025, 22:23
19 фев 2025, 22:23
6ae1b2a
Код
Авторство
О чём код?
namespace MassTransit.AzureServiceBusTransport { using System; using System.ComponentModel; using Azure.Messaging.ServiceBus.Administration; [EditorBrowsable(EditorBrowsableState.Never)] public static class Defaults { public static TimeSpan LockDuration { get; set; } = TimeSpan.FromMinutes(5); public static TimeSpan DefaultMessageTimeToLive { get; set; } = TimeSpan.FromDays(365 + 1); public static TimeSpan BasicMessageTimeToLive { get; set; } = TimeSpan.FromDays(14); public static TimeSpan AutoDeleteOnIdle { get; set; } = TimeSpan.FromDays(427); public static TimeSpan TemporaryAutoDeleteOnIdle { get; set; } = TimeSpan.FromMinutes(5); public static TimeSpan MaxAutoRenewDuration { get; set; } = TimeSpan.FromMinutes(5); public static TimeSpan? SessionIdleTimeout { get; set; } = null; // SDKs default is undefined - explicitly defined here for clarity public static TimeSpan ShutdownTimeout { get; set; } = TimeSpan.FromMilliseconds(100); public static int MaxConcurrentSessions { get; set; } = 8; public static int MaxConcurrentCallsPerSessions { get; set; } = 1; public const int MaxHeaderLengthBytes = 32767; public const int MaxHeaderLength = MaxHeaderLengthBytes / sizeof(char) - 1; public static CreateQueueOptions GetCreateQueueOptions(string queueName) { return new CreateQueueOptions(queueName) { AutoDeleteOnIdle = AutoDeleteOnIdle, DefaultMessageTimeToLive = DefaultMessageTimeToLive, EnableBatchedOperations = true, DeadLetteringOnMessageExpiration = true, LockDuration = LockDuration, MaxDeliveryCount = 5 }; } public static CreateTopicOptions GetCreateTopicOptions(string topicName) { return new CreateTopicOptions(topicName) { AutoDeleteOnIdle = AutoDeleteOnIdle, DefaultMessageTimeToLive = DefaultMessageTimeToLive, EnableBatchedOperations = true }; } } }