Skip to content

[Discussion] Service Bus - Track 2 - Management client - RuntimeProperties flattening #13353

@JoshLove-msft

Description

@JoshLove-msft

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; }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue is related to a non-management packageService Bus

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions