-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
The intent of this issue is to solicit feedback from the community in advance of the GA of the next major version of the Service Bus library (which will follow several Preview releases).
As a reference, the .NET Azure SDK guidelines can be found here: https://azure.github.io/azure-sdk/dotnet_introduction.html
Terminology:
Track 0 refers to the WindowsAzure.ServiceBus library
Track 1 refers to the Microsoft.Azure.ServiceBus library
Track 2 refers to the new library, Azure.Messaging.ServiceBus, we are working on releasing.
In the Track 1 Management API, the *RuntimeInfo types contain a nested MessageCountDetails type. This adds what feels like an unnecessary layer of indirection to what is already a fairly small type. We are proposing eliminating this type and lifting its properties directly onto the *RuntimeProperties (this rename was proposed in https://github.com/Azure/azure-sdk-for-net-pr/issues/1181) types. We would also rename the MessageCount property to TotalMessageCount:
Before:
public class QueueRuntimeInfo
{
public string Name { get; }
public long MessageCount { get; }
public MessageCountDetails MessageCountDetails { get; }
public long SizeInBytes { get; }
public DateTimeOffset CreatedAt { get; }
public DateTimeOffset UpdatedAt { get; }
public DateTimeOffset AccessedAt { get; }
}
public class MessageCountDetails
{
public long ActiveMessageCount { get; }
public long DeadLetterMessageCount { get; }
public long ScheduledMessageCount { get; }
public long TransferMessageCount { get; }
public long TransferDeadLetterMessageCount { get; }
}After:
public class QueueRuntimeProperties
{
public string Name { get; }
public long TotalMessageCount { get; }
public long ActiveMessageCount { get; }
public long DeadLetterMessageCount { get; }
public long ScheduledMessageCount { get; }
public long TransferMessageCount { get; }
public long TransferDeadLetterMessageCount { get; }
public long SizeInBytes { get; }
public DateTimeOffset CreatedAt { get; }
public DateTimeOffset UpdatedAt { get; }
public DateTimeOffset AccessedAt { get; }
}