Updated copy to reflect the new location for the Service Bus client library
and status of this repository as transitioning to a historical archive.
The contents have been massaged to more closely match the format and voice used
for the Service Bus client ReadMe in the central repository, in order to ease
the cognitive burden for those navigating over. An attempt was also made to
keep the original introductory content and context.
I believe this fixes#436
It has been been tested running in .NET Framework 4.7.2 and .NET Core 2.1 on Windows. It is assumed that the proxy is only used in transportMode=AmqpWebSockets.
When generating the package, the NuGet task emits this warning:
> The 'licenseUrl' element will be deprecated. Consider using the 'license' element instead.
Since `TreatWarningsAsErrors` is set to true in Directory.Build.props it becomes an error.
So we simply ignore this warning since we can't use 'license' instead of 'licenseUrl' yet.
See also https://github.com/NuGet/Home/issues/7509 and https://github.com/NuGet/Announcements/issues/32
* Add support for configuring OperationTimeout in the connection string
Like in [Microsoft.ServiceBus.Messaging (.NET Framework)][1], it's now possible to configure the `OperationTimeout` in the connection string.
The `ServiceBusConnection` class constructors are adapted to read the `OperationTimeout` from the connection string and the constructor explicitly having a `TimeSpan operationTimeout` argument is obsoleted with this message:
> Please use the constructor with (string namespaceConnectionString, RetryPolicy retryPolicy) arguments and define the operationTimeout in the connection string.
[1]: https://docs.microsoft.com/en-us/dotnet/api/microsoft.servicebus.servicebusconnectionstringbuilder.operationtimeout
* Use the operation timeout defined in the connection string for the ManagementClient
Also, **actually** use the operation timeout as a timeout for the `HttpClient` responsible for the management operations instead of storing the `Constants.DefaultOperationTimeout` in a private field which is never used.
* Update API Approvals
* Always append key value pair delimiter when building the connection string
* Improve wording as suggested by @SeanFeldman
* Improve operation timeout parsing
Parse as int (seconds) first, fallback on TimeSpan parsing for compatibility with WindowsAzure.ServiceBus.
* Throw if the operation timeout input is neither parsable as int or TimeSpan.
* Throw if the operation timeout is smaller than or equal to zero.
* Throw if the operation timeout is greater than or equal to one hour.
* Allow sending empty collection by skipping the actual send
* Rename test
* Improve test and add a message to help in case result is flaky
* Remove unnecessary check covered by foreach
* Parse out MessagingUnits
* Add Messaging type as that's what broker reports
* Update test for GetNamespaceInfoAsync
* Approve API (minor)
* Revert "Approve API (minor)"
This reverts commit dd9b2986fb.
* Remove NamespaceType.Messaging
* Implement workaround
The equality check between a manually created created instance of the QueueDescription class and an instance parsed from the XML response by the ManagementClient will not be considered equal. This is an issue when doing operations like create a queue if it is non existing.
The issue is originated in the property AuthorizationRules that was setting the underlying field if it was null. When an instance is being parsed from an non-existing set of rules in the XML response this property is set to an empty AuthorizationRules instance.
I decided to remove the underlying variable for simplicity and set a default value (empty AuthorizationRules instace) to remove the state-changing-getter that just seems to complicate things.
* Added GetNamespaceInfo API
* Adding serialization for alias
* Minor changes
* Updating API list
* Nit changes
Co-Authored-By: nemakam <neeraj.makam@microsoft.com>
* PR Review change
Fixes#600
* Re-enable multi-targeting
* Revert changes made in 555cabf3c6
* Fix errors for ManagementClient that was added when only netstandard2.0 was targeted.
Fixes#589
* Verification test
* Differentiate between peek and receive operations
* Indicate peek operation
* Additional test case to verify behavior when message is received
* Test delivery count on peek against real queue
* Test delivery count on peeklock against real queue
* Use Microsoft Source link
* Package PDB file for sourcelink to work
* Embed untracked sources in the package for sourcelink to work for sources that are not committed
* Add repo URL / type / commit hash to the generated nuget package
* SourceLink package should be set with PrivateAssets="All"
* Changing topicName to topicPath in CreateRuleAsync
CreateRuleAsync uses topicName as a parameter whereas the rest of the methods use topicPath. Changing for consistency.
* Fixing var typo in CreateRuleAsync
* Updating ApiApprovals.ApproveAzureServiceBus.approved.txt
* Adding back in trimmed whitespace to approved txt file to resolve unit test issue
* Fixed topicPath description in comments
In the MessageReceivePump class the RenewMessageLockTask is now canceled
gracefully instead of raise a TaskCancelledException and the catch it
again.
The code now doesn't await the canceled task, but await a new task which
just returns the canceled task. And check if the delay task is canceled
to determine if the RenewMessageLockTask should be completed or not.
Fixes#547.
Fixes-
#563 - Making Queue/Topic/Subscription descriptions forward compatible by storing all unknown properties in a list and relaying it back during Update.
#564 - Equals() should not use == to check for null
#562 - NRE when content = null.
NRE when GetRules() is invoked on rules containing custom data types.