Query/Question
When using the WindowsAzure.ServiceBus nuget package, in the Microsoft.ServiceBus namespace we have a class NamespaceManager. It has some methods like GetEventHub and GetEventHubPartition. It helps to retrieve many properties for existing Event Hubs. In .NET core, I think the equivalent is Microsoft.Azure.Management.EventHub & Azure.Messaging.EventHubs namespace. But some of the Event Hub properties that can be retrieved in .NET Framework are not retrievable in .net core.
聽 | .NET *Framework* | 聽 | .NET Core
-- | -- | -- | --
聽 | 聽 | 聽 | 聽
Class Name | Property Name | Class Name | Property Name
PartitionDescription | PartitionId | 聽 | 聽
PartitionDescription | EventHubPath | 聽 | 聽
PartitionDescription | ConsumerGroupName | 聽 | 聽
PartitionDescription | EndSequenceNumber | 聽 | 聽
PartitionDescription | BeginSequenceNumber | PartitionProperties | BeginningSequenceNumber
PartitionDescription | SizeInBytes | 聽 | 聽
PartitionDescription | IncomingBytesPerSecond | 聽 | 聽
PartitionDescription | OutgoingBytesPerSecond | 聽 | 聽
PartitionDescription | LastEnqueuedOffset | PartitionProperties | LastEnqueuedOffset
PartitionDescription | LastEnqueuedTimeUtc | PartitionProperties | LastEnqueuedTime
聽 | 聽 | 聽 | 聽
EventHubDescription | Path | 聽 | 聽
EventHubDescription | MessageRetentionInDays | Eventhub | MessageRetentionInDays
EventHubDescription | Authorization | 聽 | 聽
EventHubDescription | Status | 聽 | 聽
EventHubDescription | CreatedAt | Eventhub | CreatedAt
EventHubDescription | UpdatedAt | Eventhub | UpdatedAt
EventHubDescription | UserMetadata | 聽 | 聽
EventHubDescription | PartitionCount | Eventhub | PartitionCount
EventHubDescription | PartitionIds | Eventhub | PartitionIds
The ones in bold are the ones I am specifically looking for.
Environment:
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.101\
Host (useful for support):
Version: 3.1.1
Commit: a1388f194c
.NET Core SDKs installed:
3.1.101 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Hi @srivathsanvlb
Packages WindowsAzure.ServiceBus, Microsoft.Azure.Management.EventHub, and Azure.Messaging.EventHubs are different packages.
Azure.Messaging.EventHubs is use to operate data of EventHubs, and Microsoft.Azure.Management.EventHub is use to manage EventHubs.
Actually, it is hard to say that WindowsAzure.ServiceBus and Microsoft.Azure.Management.EventHub are equivalents even both of them can be used to operate with EventHubs. All 3 packages support both .NET Framework and .NET Core.
If just switch .NET Framework to .NET Core, please continue to use WindowsAzure.ServiceBus in your .NET Core project directly. Of course, if you want to refactor the Application, the latest EventHub package Azure.Messaging.EventHubs is strongly recommended to be the package to interact with EventHub.
@jongio
Ok @wantedfast , Actually I am trying to use it in a .NET Standard project. But I am facing the following issue.

I think they are talking about the same in https://github.com/dotnet/wcf/issues/3172
Please let me know on how to proceed.
The failure is due to fact that MicrosoftAzure.ServiceBus SDK doesn't support .NET Standard.
Thanks @serkantkaraca . Actually I need the above said properties in a .NET standard project.
Can any one let me know where I can get them?
@serkantkaraca - Do you have that info for @srivathsanvlb?
Sorry for late response.
There are 2 APIs you can use to access them.
https://azuresdkdocs.blob.core.windows.net/$web/dotnet/Microsoft.Azure.EventHubs/4.1.1/api/Microsoft.Azure.EventHubs/Microsoft.Azure.EventHubs.EventHubClient.html#Microsoft_Azure_EventHubs_EventHubClient_GetPartitionRuntimeInformationAsync_System_String_
See the returned object descriptions on the API page. Let me know if you have any questions.
Hi @serkantkaraca
Thanks for your reply. But I don't see the properties that I am looking for.
To re-iterate, I am specifically looking for the following properties that are available in .NET Framework. Methods like GetEventHub and GetEventHubPartition are used for getting the below property values. I am looking for the equivalent in .NET Standard. Kindly let me know about the same.
聽 | .NET聽Framework | 聽 | .NET Standard
-- | -- | -- | --
聽 | 聽 | 聽 | 聽
Class Name | Property Name |
PartitionDescription | SizeInBytes | 聽 | 聽
PartitionDescription | IncomingBytesPerSecond | 聽 | 聽
PartitionDescription | OutgoingBytesPerSecond | 聽 | 聽
EventHubDescription | Status | 聽 | 聽
Unfortunately, those are not available from .Net Standard client.
@serkantkaraca oh ok
We are currently working to upgrade .NET framework projects to .NET Standard/.NET Core.
We are facing some blockers similar to the above. What is the right way to ask Microsoft to consider our request for enabling .NET Core/Standard to expose properties/methods that we use in .NET Framework?
You should consider upgrading to https://www.nuget.org/packages/Azure.Messaging.EventHubs/ instead. We are not adding any new features to Microsoft.Azure.EventHubs.
For any missing feature, create a new issue so SDK Team can track them.
My understanding after looking at #10421 and speaking with @serkantkaraca is that the requested properties are only available within the management REST API and not currently exposed on the data plane. I'll ask Serkant to please correct me if I misunderstood that conversation.
For the client libraries, we'll continue the discussion on the potential to include them using #10421, but I believe that there is merit to considering this as a gap in the management library as well. In the short term, addressing via including in the management library is likely to be the most expedient path to unblocking @srivathsanvlb.
//cc: @wantedfast, @jongio
@serkantkaraca @jsquire
Thanks for the support.
I will use the REST API as of now. You can close this ticket or leave it open, will leave it to your discretion.
@jsquire , Is there a similar API available for managing the Relays using Shared access signature. I don't find it in the documentation.
@jsquire , Is there a similar API available for managing the Relays using Shared access signature. I don't find it in the documentation.
On that, I'll have to defer to @serkantkaraca, as beyond the documentation, I don't have any insight to offer.
@jsquire , Is there a similar API available for managing the Relays using Shared access signature. I don't find it in the documentation.
You mean REST API? If so, you can find them here - https://docs.microsoft.com/en-us/rest/api/relay/
@serkantkaraca
@jsquire , Is there a similar API available for managing the Relays using Shared access signature. I don't find it in the documentation.
You mean REST API? If so, you can find them here - https://docs.microsoft.com/en-us/rest/api/relay/
These REST APIs must be authenticated using a bearer token ie oauth authentication. I think @ArunPrabhuM is looking for something similar to https://docs.microsoft.com/en-us/rest/api/eventhub/get-partition-runtime-metadata where the REST API can be authenticated using a Shared Access Signature instead of Bearer OAuth tokens.
Yes, both Wcf Relays and HybridConnections support management over HTTP with SAS. What APIs are you looking for?
https://docs.microsoft.com/en-us/rest/api/relay/wcfrelays/get
@serkantkaraca
We are trying to use the above REST API endpoint with SAS authentication
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jfggdl.
@jfggdl Hi, this is a feature request to the management plane SDK of Event Hub to expose this REST API . Could you consider and prioritize it? Thank you.
We have accepted this ask into our internal backlog for evaluation for prioritization in the first half of 2021. Thank you for sharing!