dotnet-sdk icon indicating copy to clipboard operation
dotnet-sdk copied to clipboard

Unable to use EventHub or Service Bus Dapr Component

Open mshashi0306 opened this issue 1 year ago • 3 comments

Hi Team,

I am not able to use Event Hub Binding or Service Bus using Dapr component.

But same connectivity is working using TransportType = AmqpWebSockets using .NET lib.

Can someone help me to achieve the same using Dapr Config i.e. use of TransportType in dapr

mshashi0306 avatar Apr 09 '24 08:04 mshashi0306

@mshashi0306 Can you be more specific about what you've tried, what error or unexpected behavior you're getting, and what versions of Dapr runtime, Dapr SDK, and .NET you're using. Dapr logs are often helpful (set --log-level debug), too. A sample project that produces the issue is even better.

philliphoff avatar Apr 15 '24 16:04 philliphoff

Hi @philliphoff,

I am using Dapr.AspNetCore version 1.30.0 and trying to configure the transport type for the Service Bus component, but it's not working as expected.

The following code works correctly with standard .NET code:

var clientOptions = new ServiceBusClientOptions(); clientOptions.TransportType = ServiceBusTransportType.AmqpWebSockets;

I am attempting to set the transportType : AmqpWebSockets in the metadata of the Service Bus component, but this configuration does not seem to be effective.

For reference, here is the documentation for ServiceBusTransportType: https://learn.microsoft.com/en-us/dotnet/api/azure.messaging.servicebus.servicebustransporttype?view=azure-dotnet

mshashi0306 avatar Aug 21 '24 10:08 mshashi0306

@mshashi0306 Dapr isn't a full-feature replacement for the various vendor-specific SDKs and instead is a generalized abstraction. I don't see anything in the current binding implementation documentation for a Service Bus queue or in the pubsub documentation for queues or topics that would suggest support for the transport type you're looking for.

If it's something you really need and feel like contributing, we'd be happy to take a look at such a pull request, but I don't believe this is something that's currently supported.

WhitWaldo avatar Oct 14 '24 05:10 WhitWaldo