Skip to content

Commit

Permalink
Merge pull request #5143 from Particular/fix-asq
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmarbach authored Nov 28, 2020
2 parents 4192d39 + 20fc78d commit 585a88a
Show file tree
Hide file tree
Showing 76 changed files with 64 additions and 52 deletions.
19 changes: 4 additions & 15 deletions Snippets/ASQ/ASQ.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,25 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASQ_7", "ASQ_7\ASQ_7.csproj
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASQ_8", "ASQ_8\ASQ_8.csproj", "{2E1597FF-7427-4228-88F7-77634AA72DC2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASQ_9", "ASQ_9\ASQ_9.csproj", "{C7C7DD68-94CC-4526-A6C0-85FFEF9C5098}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASQN_9", "ASQN_9\ASQN_9.csproj", "{C7C7DD68-94CC-4526-A6C0-85FFEF9C5098}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASQ_10", "ASQ_10\ASQ_10.csproj", "{E99DE1EC-CADD-439C-BDEF-FC73803CBF71}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ASQN_10", "ASQN_10\ASQN_10.csproj", "{8A9DBCC7-8E83-4315-8BA7-AF94540DCFE1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6D2B8C0E-83E7-46C8-B723-8B9BCE3D3A8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6D2B8C0E-83E7-46C8-B723-8B9BCE3D3A8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D2B8C0E-83E7-46C8-B723-8B9BCE3D3A8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D2B8C0E-83E7-46C8-B723-8B9BCE3D3A8E}.Release|Any CPU.Build.0 = Release|Any CPU
{0D5ADE95-C7DF-4243-900F-DE8955C5AA9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D5ADE95-C7DF-4243-900F-DE8955C5AA9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D5ADE95-C7DF-4243-900F-DE8955C5AA9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D5ADE95-C7DF-4243-900F-DE8955C5AA9C}.Release|Any CPU.Build.0 = Release|Any CPU
{2E1597FF-7427-4228-88F7-77634AA72DC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E1597FF-7427-4228-88F7-77634AA72DC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E1597FF-7427-4228-88F7-77634AA72DC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E1597FF-7427-4228-88F7-77634AA72DC2}.Release|Any CPU.Build.0 = Release|Any CPU
{C7C7DD68-94CC-4526-A6C0-85FFEF9C5098}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C7C7DD68-94CC-4526-A6C0-85FFEF9C5098}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7C7DD68-94CC-4526-A6C0-85FFEF9C5098}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7C7DD68-94CC-4526-A6C0-85FFEF9C5098}.Release|Any CPU.Build.0 = Release|Any CPU
{E99DE1EC-CADD-439C-BDEF-FC73803CBF71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E99DE1EC-CADD-439C-BDEF-FC73803CBF71}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E99DE1EC-CADD-439C-BDEF-FC73803CBF71}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E99DE1EC-CADD-439C-BDEF-FC73803CBF71}.Release|Any CPU.Build.0 = Release|Any CPU
{8A9DBCC7-8E83-4315-8BA7-AF94540DCFE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A9DBCC7-8E83-4315-8BA7-AF94540DCFE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1;net48</TargetFrameworks>
<OutputType>Exe</OutputType>
<LangVersion>7.3</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.*" />
<PackageReference Include="NServiceBus.Newtonsoft.Json" Version="3.0.0-*" />
<PackageReference Include="NServiceBus.Transport.AzureStorageQueues" Version="10.0.0-alpha.219" />
<PackageReference Include="NServiceBus.Transport.AzureStorageQueues" Version="10.0.0-alpha.221" />
<ProjectReference Include="..\Shared\Shared.csproj" />
</ItemGroup>

<ItemGroup Label="Force a later version of a transitive dependency">
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ class Program
{
static async Task Main()
{
var endpointName = "Samples-Azure-StorageQueues-Endpoint1";
#region endpointName

var endpointName = "Samples.Azure.StorageQueues.Endpoint1.With.A.Very.Long.Name.And.Invalid.Characters";
var endpointConfiguration = new EndpointConfiguration(endpointName);

#endregion

Console.Title = endpointName;

#region config
Expand All @@ -24,6 +28,12 @@ static async Task Main()
endpointConfiguration.EnableInstallers();
endpointConfiguration.SendFailedMessagesTo("error");

#region sanitization

transport.SanitizeQueueNamesWith(BackwardsCompatibleQueueNameSanitizer.WithMd5Shortener);

#endregion

var endpointInstance = await Endpoint.Start(endpointConfiguration)
.ConfigureAwait(false);
Console.WriteLine("Press 'enter' to send a message");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1;net48</TargetFrameworks>
<OutputType>Exe</OutputType>
<LangVersion>7.3</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.*" />
<PackageReference Include="NServiceBus.Newtonsoft.Json" Version="3.0.0-*" />
<PackageReference Include="NServiceBus.Transport.AzureStorageQueues" Version="10.0.0-alpha.219" />
<PackageReference Include="NServiceBus.Transport.AzureStorageQueues" Version="10.0.0-alpha.221" />
<ProjectReference Include="..\Shared\Shared.csproj" />
</ItemGroup>

<ItemGroup Label="Force a later version of a transitive dependency">
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1;net48</TargetFrameworks>
<LangVersion>7.3</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1;net48</TargetFrameworks>
<OutputType>Exe</OutputType>
<LangVersion>7.3</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.*" />
<PackageReference Include="NServiceBus.Newtonsoft.Json" Version="2.*" />
<PackageReference Include="NServiceBus.Transport.AzureStorageQueues" Version="9.*" />
<ProjectReference Include="..\Shared\Shared.csproj" />
</ItemGroup>

<ItemGroup Label="Force a later version of a transitive dependency">
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ class Program
{
static async Task Main()
{
var endpointName = "Samples-Azure-StorageQueues-Endpoint1";
#region endpointName

var endpointName = "Samples.Azure.StorageQueues.Endpoint1.With.A.Very.Long.Name.And.Invalid.Characters";
var endpointConfiguration = new EndpointConfiguration(endpointName);

#endregion

Console.Title = endpointName;

#region config
Expand All @@ -27,6 +31,12 @@ static async Task Main()
endpointConfiguration.SendFailedMessagesTo("error");
endpointConfiguration.DisableFeature<TimeoutManager>();

#region sanitization

transport.SanitizeQueueNamesWith(BackwardsCompatibleQueueNameSanitizer.WithMd5Shortener);

#endregion

var endpointInstance = await Endpoint.Start(endpointConfiguration)
.ConfigureAwait(false);
Console.WriteLine("Press 'enter' to send a message");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1;net48</TargetFrameworks>
<OutputType>Exe</OutputType>
<LangVersion>7.3</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.*" />
<PackageReference Include="NServiceBus.Newtonsoft.Json" Version="2.*" />
<PackageReference Include="NServiceBus.Transport.AzureStorageQueues" Version="9.*" />
<ProjectReference Include="..\Shared\Shared.csproj" />
</ItemGroup>

<ItemGroup Label="Force a later version of a transitive dependency">
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1;net48</TargetFrameworks>
<LangVersion>7.3</LangVersion>
Expand Down
Binary file removed samples/azure/storage-queues/images/queues-as-is.png
Binary file not shown.
Binary file removed samples/azure/storage-queues/images/queues.png
Binary file not shown.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
![](images/sanitized-queues.png)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


## Sanitizer source code

snippet: BackwardsCompatibleQueueNameSanitizer
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


#### Sanitization

One of the endpoints is using a long name which needs to be sanitized.

snippet: endpointname

To remain backwards compatible with the older versions of the transport, `MD5` based sanitization is registered. The sample also includes `SHA1` based sanitization. This sanitizer is suitable for endpoints with the transport version 7.x used to shorten queue names with `SHA1` hashing algorithm.

snippet: sanitization

The full contents of the sanitization code is shown at the [end of this document](#sanitizer-source-code).
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Disabling the timeout manager

To assist with the upgrade process, the timeout manager is still enabled by default, so any delayed messages already stored in the endpoint's persistence database before the upgrade will be sent when their timeouts expire. Any delayed messages sent after the upgrade will be sent through the delay infrastructure even though the timeout manager is enabled.

Once an endpoint has no more delayed messages in its persistence database, there is no more need for the timeout manager. It can be disabled by calling:

snippet: delayed-delivery-disable-timeoutmanager

At this point, the `{endpoint}-timeouts` and `{endpoint}-timeoutsdispatcher` queues can be deleted from the storage account. In addition, the endpoint no longer requires timeout persistence, so those storage tables can be removed from the persistence database as well.
4 changes: 2 additions & 2 deletions transports/upgrades/asq-6to7.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Setting the configuration values can now be done via API in the following way:
* [ConnectionString](/transports/azure-storage-queues/configuration.md#configuration-parameters-connectionstring)
* [BatchSize](/transports/azure-storage-queues/configuration.md#configuration-parameters-batchsize)
* [MaximumWaitTimeWhenIdle](/transports/azure-storage-queues/configuration.md#configuration-parameters-maximumwaittimewhenidle)
* [DegreeOfReceiveParallelism](/transports/azure-storage-queues/configuration.md#configuration-parameters-degreeofreceiveparallelism)
* [DegreeOfReceiveParallelism](/transports/azure-storage-queues/configuration.md?version=asq_7#configuration-parameters-degreeofreceiveparallelism)
* [PeekInterval](/transports/azure-storage-queues/configuration.md#configuration-parameters-peekinterval)
* [MessageInvisibleTime](/transports/azure-storage-queues/configuration.md#configuration-parameters-messageinvisibletime)

Expand Down Expand Up @@ -85,4 +85,4 @@ In version 7, the public API has been reduced. As a result, multiple classes tha

> This class served only internal purposes without providing any extensibility point and as such was removed from the public API. For more information, refer to the documentation.
If code exists that depends on classes that were deprecated with the above message, and it is not clear how to update it, [contact support](https://particular.net/contactus) to get help in resolving that issue.
If code exists that depends on classes that were deprecated with the above message, and it is not clear how to update it, [contact support](https://particular.net/contactus) to get help in resolving that issue.

0 comments on commit 585a88a

Please sign in to comment.