azure-service-bus-dotnet | ️ .NET Standard client library for Azure Service Bus | Pub Sub library
kandi X-RAY | azure-service-bus-dotnet Summary
kandi X-RAY | azure-service-bus-dotnet Summary
Azure Service Bus allows you to build applications that take advantage of asynchronous messaging patterns using a highly-reliable service to broker messages between producers and consumers. Azure Service Bus provides flexible, brokered messaging between client and server, along with structured first-in, first-out (FIFO) messaging, and publish/subscribe capabilities with complex routing.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of azure-service-bus-dotnet
azure-service-bus-dotnet Key Features
azure-service-bus-dotnet Examples and Code Snippets
Community Discussions
Trending Discussions on azure-service-bus-dotnet
QUESTION
My console application is running on a VM in an Azure Scale Set but is not able to connect to an Azure Service Bus using the VMSS Managed Service Identity.
An exception is thrown when it attempts to acquire an access token via TokenProvider.CreateManagedServiceIdentityTokenProvider().
- The Identity (System Assigned) is enabled on the Virtual Machine Scale Set (VMSS ).
- The VMSS Identity is assigned the Role Azure Service Bus Data Owner on the Service Bus Namespace
Is there a step or requirement that I am missing?
Sample code
...ANSWER
Answered 2019-Jun-13 at 05:17As per the exception message, it looks like Managed identity is not enabled on the VMSS. How did you verify that it is enabled?
Also, can you please specify which Service Bus NuGet package are you using, and what version?
QUESTION
I have a client written for some time ago that uses the old library and does call GetBody()
to read the body when receiving messages.
Now I have the new client Microsoft.Azure.ServiceBus
(sends messages) that as far as I understand always uses Stream
.
So the old client just crashes as it expects string body type. I have found a lot of information on the opposite scenario (new reader, old writer), but cannot figure out how to make the new client send the data in required format.
Related links:
...ANSWER
Answered 2019-May-08 at 20:56The scenario is described here. You will need to serialize the message following this approach:
QUESTION
I keep getting MessageLockLostExceptions
when processing messages.
- I am using Microsoft.Azure.ServiceBus 3.2.0 with .NET Core 2.1.
- I have a queue with
LockDuration
set to 30 seconds already containing a number of messages to be processed. - I took the very basic message-receiving tutorial code from https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dotnet-get-started-with-queues#receive-messages-from-the-queue, which works fine.
Now I want to simulate a slightly longer running message processing task (but still well within LockDuration
) by adding Task.Delay(10_000)
. But then I get a MessageLockLostException
for exactly every 4th message.
This happens even if I set MaxAutoRenewDuration = TimeSpan.FromDays(30)
and PrefetchCount = 0
.
This is the message processing method, which I changed slightly to print out the remaining lock duration:
...ANSWER
Answered 2018-Dec-13 at 04:35You need to Complete
the message before the Lock Token
gets expired. Once the Lock Token is expired, you will receive MessageLockLostException
during the complete operation.
I can see that you are delaying the thread execution by 10 seconds for each message. But the messages seems to be fetched at the same point of time, that's why the remaining lock duration keeps reducing for each message.
For the fourth message, the Remaining lock duration is 00:00:00.1776760
. So, after 177 milliseconds
, the lock will expire. You are delaying the thread by 10 seconds
in the next line. So, the lock would expire and you are getting MessageLockLostException
. To avoid this exception, remove the
Delay
QUESTION
I downloaded the code from here: https://github.com/Azure/azure-service-bus-dotnet
and tried try to run the tests but am getting this: Message: System.TypeInitializationException : The type initializer for 'Microsoft.Azure.ServiceBus.UnitTests.TestUtility' threw an exception. ---- System.ArgumentException : Illegal connection string parameter name 'StsEndpoint' Parameter name: connectionString
I'm using on premise service bus version. Is this not supposed to be supported? This is the connection string I use:
Endpoint=sb://hostname.corp.domain.com/ServiceBusEapQANamespace;StsEndpoint=https://hostname.corp.domain.com:9355/ServiceBusEapQANamespace;RuntimePort=9354;ManagementPort=9355;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=bKnerepD9LBGHIVAM4nXJTw5kAAP5updfQYhH2gFG/o=
This same connection string works fine with other tools e.g. Service Bus Explorer
If I remove couple of the "unsupported" parameters and simplify my conn string to this: Endpoint=sb://hostname.corp.domain.com/ServiceBusEapQANamespace;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=bKnerepD9LBGHIVAM4nXJTw5kAAP5updfQYhH2gFG/o=
I get this error: Message: Microsoft.Azure.ServiceBus.MessagingEntityNotFoundException : None of the server sasl-mechanisms ([PLAIN,EXTERNAL]) are supported by the client (MSSBCBS).
I've opened an issue on the project's site for this as well
https://github.com/Azure/azure-service-bus-dotnet/issues/167
...ANSWER
Answered 2018-Mar-01 at 22:19As answered in the issue you opened, new .Net Core client (Microsoft.Azure.ServiceBus) only supports SAS authentication, which is not available for on-premises Service Bus.
QUESTION
I want to send a message over Azure Service Bus from a .NET Core console app and receive it with in a .NET 4.6 console app. In .NET Core I'm using Azure's new service bus client for the sender which is not yet intended for production (according to their readme).
https://github.com/Azure/azure-service-bus-dotnet
I can send from .NET Core and receive with .NET Core easily enough using the samples. However when the .NET 4.6 app subscribes to the Topic and receives the same message the .NET 4.6 app throws this exception:
...ANSWER
Answered 2017-Jul-12 at 23:35Sounds like an interoperability issue
The fix was merged into dev
branch, but hasn't gone out yet. Scheduled for 0.0.7-preview
milestone`. You can track it under the GitHub repo.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install azure-service-bus-dotnet
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page