New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Management Operations #481

Merged
merged 106 commits into from Jun 28, 2018

Conversation

Projects
None yet
4 participants
@nemakam
Copy link
Member

nemakam commented Jun 7, 2018

Introduces Serivce Bus Management operations - CRUD of entities
Fixes #65

The API is exposed through ManagementClient which uses HTTP underneath to perform these operations.
Summary of exposed operations:

  1. GetQueue returns the QueueDescription which contains static information about the queue.
  2. QueueDescription is required to Create or Update the queue.
  3. ManagementClient.GetQueueRuntimeInfo returns QueueRuntimeInfo which contains runtime information of the queue like the message count and the size.
  4. GetQueues will return list of QueueDescription and will not contain runtime information.

Majority of the operations are similar to the ones exposed in older client (Microsoft.ServiceBus -> NamespaceManager), with following differences:

  1. GetQueue now returns only static information as part of QueueDescription and runtime information is part of QueueRuntimeInfo.
  2. Default value of DuplicateDetection feature is 1 minute.

makam added some commits May 15, 2018

Changing API structure.
RuntimeInfo part of Description.
Removed overloads of cancellationToken from interface
Removed couple of  EntityStatus enum values.
@SeanFeldman

This comment has been minimized.

Yes. NServiceBus has a concept of "installers" - setting up topology at run-time.

@SeanFeldman

This comment has been minimized.

Yes. NServiceBus has a concept of "installers" - setting up topology at run-time.

@SeanFeldman

This comment has been minimized.

While I don't have a usage for this one, some customers do spin up endpoint that are extremely short-lived and tear down along with entities for compliancy needs.

@SeanFeldman

This comment has been minimized.

Copy link
Collaborator

SeanFeldman commented on 68e4611 May 17, 2018

Could be a good idea to make public classes sealed.

This comment has been minimized.

Copy link
Collaborator

SeanFeldman replied May 17, 2018

<entity>RuntimeInfo vs <entity>Description - what's the idea here?

This comment has been minimized.

Copy link
Collaborator

SeanFeldman replied May 17, 2018

There's a discrepency between TopicDescription (in megs) and the rest (in bytes).
Personally, I'd do everything in gigs. No point to force math on customers.

This comment has been minimized.

Copy link
Collaborator

SeanFeldman replied May 17, 2018

MessageCountDetails - assume that will be gone in favor of Azure Monitor?

@SeanFeldman

This comment has been minimized.

@makam in the past, this API would not impose any limits. What's the reason to do so here?

This comment has been minimized.

Copy link
Member

nemakam replied May 22, 2018

API on service always had that limit. But client used to enumerate it repeatedly. This used to create issues for namespaces having loads of entities wrt OperationTimeout as well few other issues. We want to make things more explicit so that user understands what's happening. There will be other overloads to get other queues :)

This comment has been minimized.

Copy link
Collaborator

SeanFeldman replied May 22, 2018

We want to make things more explicit so that user understands what's happening.

👍

here will be other overloads to get other queues :)

What "other" queues you're referring to?

This comment has been minimized.

Copy link
Member

nemakam replied May 22, 2018

I mean, the remaining queues. Cases when you have more than 100 queues.

This comment has been minimized.

Copy link
Collaborator

SeanFeldman replied May 22, 2018

Oh, that. Yeah, this is why personally rather see what suggested in 6547e6e#r29086396

@SeanFeldman

This comment has been minimized.

// TODO: Should we expose GetQueuesCount()?

Yes. W/o that, and with limitting to 100 queues, there's no way to know there are queues.
Alternatively, allow pagination by returning a result that is more than just queue names. E.g.:

{
  IList<string> Queues;
  bool HasMoreResults;
}

This comment has been minimized.

Copy link
Member

nemakam replied May 22, 2018

I'm trying to separate client changes and service side changes in the first iteration. GetQueuesCount() might not make it to first round unfortunately. The alternative you suggested is interesting. Will consider

@nemakam nemakam requested a review from Azure/azure-service-bus-write as a code owner Jun 7, 2018

@nemakam nemakam changed the title [WIP] Management Operations Management Operations Jun 23, 2018

makam and others added some commits Jun 23, 2018

makam added some commits Jun 26, 2018

@SeanFeldman

This comment has been minimized.

Copy link
Collaborator

SeanFeldman commented Jun 27, 2018

@nemakam is there anything else on this PR or could it be merged/released?

@nemakam

This comment has been minimized.

Copy link
Member

nemakam commented Jun 27, 2018

@SeanFeldman
Waiting for the internal review to finish... Will publish the preview package tomorrow...
Meanwhile, your review status is also in requested changes :)

@SeanFeldman

This comment has been minimized.

Copy link
Collaborator

SeanFeldman commented Jun 27, 2018

haha, that's ancient history 😄
image

makam added some commits Jun 28, 2018

minor cleanup
1. Moving public methods before private
2. Constants cleanup

@nemakam nemakam merged commit 58f08b7 into dev Jun 28, 2018

1 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
license/cla All CLA requirements met.
Details

@nemakam nemakam deleted the management branch Jun 28, 2018

@nemakam nemakam added this to the 3.1.0 milestone Jun 28, 2018

@SeanFeldman

This comment has been minimized.

Copy link
Collaborator

SeanFeldman commented Jun 29, 2018

🎉 🎈 🎆

@mookid8000

This comment has been minimized.

Copy link

mookid8000 commented Jun 29, 2018

How weird and sad that it should take so long to get queue and topic creation capabilities back in the driver, but it's so awesome that it's finally in! 👍 🎉 🌮

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment