简体   繁体   中英

To implement Windows Azure Service Bus in .NETCoreApp,Version=v1.0

I'm trying to use Azure Service Bus with .NET Core. When I try to install WindowsAzure.ServiceBus 3.4.3 through Nuget package in my .Net Core App.

It gives me following error:

Package WindowsAzure.ServiceBus 3.4.3 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package WindowsAzure.ServiceBus 3.4.3 supports: net45 (.NETFramework,Version=v4.5) One or more packages are incompatible with .NETCoreApp,Version=v1.0.

Please suggest a compatible Nuget package of Windows Azure Service Bus for .Net Core App as I want to use "Queue Client" to send and receive message from Azure Service Bus.

You can use the Microsoft.Azure.ServiceBus nuget. And use the following code to push your messages.

IQueueClient queueClient = new QueueClient(connectionString,entitypath);
Message message = new Message(utf8encodedstring);
await queueClient.SendAsync(message);
await queueClient.CloseAsync();

You can use Azure Service Bus with REST API. The url looks like:

http{s}://{serviceNamespace}.servicebus.windows.net/{queuePath|topicPath}/messages

And here you can find some examples: Service Bus Runtime REST .

There is also an option to use AMQP protocol. There is AMQP.Net Lite Library which enables you that with some examples here and here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM