Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,33 @@

### RockLib.Messaging.NamedPipes

> [!WARNING]
> The 5.0.0 release of this library will be the final version with upgrades and changes. Bug fixes will continue to be released as needed.

### RockLib.Messaging.SQS

### RockLib.Messaging.SNS

### RockLib.Messaging.Http

> [!WARNING]
> The 4.0.0 release of this library will be the final version with upgrades and changes. Bug fixes will continue to be released as needed.

### RockLib.Messaging.Kafka

> [!WARNING]
> The 4.0.0 release of this library will be the final version with upgrades and changes. Bug fixes will continue to be released as needed.

### RockLib.Messaging.RabbitMQ

> [!WARNING]
> The 3.0.0 release of this library will be the final version with upgrades and changes. Bug fixes will continue to be released as needed.

### RockLib.Messaging.CloudEvents

> [!WARNING]
> The 4.0.0 release of this library will be the final version with upgrades and changes. Bug fixes will continue to be released as needed.

-----

- [Getting started](docs/GettingStarted.md)
Expand Down
7 changes: 0 additions & 7 deletions RockLib.Messaging.All.sln
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RockLib.Messaging.CloudEven
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RockLib.Messaging.CloudEvents.Tests", "Tests\RockLib.Messaging.CloudEvents.Tests\RockLib.Messaging.CloudEvents.Tests.csproj", "{B7B9E920-3251-4AE6-AA83-5147EC3403E6}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "RockLib.Messaging.HttpUtils", "RockLib.Messaging.HttpUtils\RockLib.Messaging.HttpUtils.shproj", "{93800DE0-2CC4-454D-BD9C-4C7058DFD276}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.Messaging.CloudEvents", "Examples\Example.Messaging.CloudEvents\Example.Messaging.CloudEvents.csproj", "{13418188-1DFE-48F4-9103-B592B34023B2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.Application.Testing", "Examples\Example.Application.Testing\Example.Application.Testing.csproj", "{7221DFC0-ED53-4F4D-8CB7-163FEEF1E5F8}"
Expand All @@ -81,11 +79,6 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RockLib.Messaging.RabbitMQ.Tests", "Tests\RockLib.Messaging.RabbitMQ.Tests\RockLib.Messaging.RabbitMQ.Tests.csproj", "{FE0B8186-6C98-4574-811E-1012DE468C29}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
RockLib.Messaging.HttpUtils\RockLib.Messaging.HttpUtils.projitems*{93800de0-2cc4-454d-bd9c-4c7058dfd276}*SharedItemsImports = 13
RockLib.Messaging.HttpUtils\RockLib.Messaging.HttpUtils.projitems*{a84fce16-e330-498f-a4a2-b4467153d731}*SharedItemsImports = 5
RockLib.Messaging.HttpUtils\RockLib.Messaging.HttpUtils.projitems*{ffc6155d-02d8-49f1-8943-a079bd8bff26}*SharedItemsImports = 5
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Expand Down
7 changes: 7 additions & 0 deletions RockLib.Messaging.CloudEvents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 4.0.0-alpha.1 - 2025-02-03

#### Changed
- Removed .NET 6 as a target framework.
- Updated the following packages:
- RockLib.Messaging.4.0.1 -> RockLib.Messaging.5.0.0-alpha.1

## 3.0.1 - 2024-07-19

#### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
<PackageReleaseNotes>A changelog is available at https://github.com/RockLib/RockLib.Messaging/blob/main/RockLib.Messaging.CloudEvents/CHANGELOG.md.</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageTags>rocklib messaging cloudevents</PackageTags>
<PackageVersion>3.0.1</PackageVersion>
<PackageVersion>4.0.0-alpha.1</PackageVersion>
<PublishRepositoryUrl>True</PublishRepositoryUrl>
<Version>3.0.1</Version>
<Version>4.0.0-alpha.1</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="RockLib.Messaging" Version="4.0.1" />
<PackageReference Include="RockLib.Messaging" Version="5.0.0-alpha.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
Expand All @@ -31,5 +31,4 @@
<ItemGroup Condition="'$(TargetFramework)'=='net48'">
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>
<Import Project="..\RockLib.Messaging.HttpUtils\RockLib.Messaging.HttpUtils.projitems" Label="Shared" />
</Project>
7 changes: 7 additions & 0 deletions RockLib.Messaging.Http/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 4.0.0-alpha.1 - 2025-02-03

#### Changed
- Removed .NET 6 as a target framework.
- Updated the following packages:
- RockLib.Messaging.4.0.1 -> RockLib.Messaging.5.0.0-alpha.1

## 3.0.1 - 2024-07-19

#### Changed
Expand Down
130 changes: 130 additions & 0 deletions RockLib.Messaging.Http/HttpUtils.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
using System;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Text;

namespace RockLib.Messaging
{
internal static class HttpUtils
{
public static void AddHeader(HttpHeaders headers, string headerName, string? headerValue)
{
if (headerValue is null)
{
return;
}

if (SupportsMultipleValues(headerName))
{
headers.Add(headerName, SplitByComma(headerValue));
}
else
{
headers.Add(headerName, headerValue);
}
}

public static bool IsContentHeader(string headerName)
{
switch (headerName)
{
case "Allow":
case "Content-Disposition":
case "Content-Encoding":
case "Content-Language":
case "Content-Length":
case "Content-Location":
case "Content-MD5":
case "Content-Range":
case "Content-Type":
case "Expires":
case "Last-Modified":
return true;

default:
return false;
}
}

private static bool SupportsMultipleValues(string headerName)
{
switch (headerName)
{
case "Allow":
case "Content-Encoding":
case "Content-Language":
case "Accept":
case "Accept-Charset":
case "Accept-Encoding":
case "Accept-Language":
case "Cache-Control":
case "Connection":
case "Expect":
case "If-Match":
case "If-None-Match":
case "Pragma":
case "TE":
case "Trailer":
case "Transfer-Encoding":
case "Upgrade":
case "Via":
return true;

default:
return false;
}
}

private static IEnumerable<string> SplitByComma(string? headerValue)
{
string value;

if (headerValue is null)
{
yield break;
}

#if NET48
if (!headerValue.Contains(","))
#else
if (!headerValue.Contains(',', StringComparison.InvariantCultureIgnoreCase))
#endif
{
value = headerValue.Trim();
if (value.Length > 0)
{
yield return value;
}

yield break;
}

var sb = new StringBuilder();

foreach (var header in headerValue)
{
switch (header)
{
case ',':
value = sb.ToString().Trim();
if (value.Length > 0)
yield return value;
sb.Clear();
continue;
default:
sb.Append(header);
continue;
}
}

if (sb.Length > 0)
{
value = sb.ToString().Trim();
if (value.Length > 0)
{
yield return value;
}
}
}
}
}
7 changes: 3 additions & 4 deletions RockLib.Messaging.Http/RockLib.Messaging.Http.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>RockLib.Messaging.Http</PackageId>
<PackageVersion>3.0.1</PackageVersion>
<PackageVersion>4.0.0-alpha.1</PackageVersion>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReleaseNotes>A changelog is available at https://github.com/RockLib/RockLib.Messaging/blob/main/RockLib.Messaging.Http/CHANGELOG.md.</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/RockLib/RockLib.Messaging</PackageProjectUrl>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageIcon>icon.png</PackageIcon>
<PackageTags>rocklib messaging http</PackageTags>
<PublishRepositoryUrl>True</PublishRepositoryUrl>
<Version>3.0.1</Version>
<Version>4.0.0-alpha.1</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="RockLib.Messaging" Version="4.0.1" />
<PackageReference Include="RockLib.Messaging" Version="5.0.0-alpha.1" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net48'">
<PackageReference Include="System.Net.Http" Version="4.3.4" />
Expand All @@ -31,5 +31,4 @@
<None Include="..\LICENSE.md" Pack="true" PackagePath="" />
<None Include="..\icon.png" Pack="true" PackagePath="" />
</ItemGroup>
<Import Project="..\RockLib.Messaging.HttpUtils\RockLib.Messaging.HttpUtils.projitems" Label="Shared" />
</Project>
14 changes: 0 additions & 14 deletions RockLib.Messaging.HttpUtils/RockLib.Messaging.HttpUtils.projitems

This file was deleted.

13 changes: 0 additions & 13 deletions RockLib.Messaging.HttpUtils/RockLib.Messaging.HttpUtils.shproj

This file was deleted.

7 changes: 7 additions & 0 deletions RockLib.Messaging.Kafka/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 4.0.0-alpha.1 - 2025-02-03

#### Changed
- Removed .NET 6 as a target framework.
- Updated the following packages:
- RockLib.Messaging.4.0.1 -> RockLib.Messaging.5.0.0-alpha.1

## 3.0.1 - 2024-07-19

#### Changed
Expand Down
8 changes: 4 additions & 4 deletions RockLib.Messaging.Kafka/RockLib.Messaging.Kafka.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
<PackageReleaseNotes>A changelog is available at https://github.com/RockLib/RockLib.Messaging/blob/main/RockLib.Messaging.Kafka/CHANGELOG.md.</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageTags>rocklib messaging kafka</PackageTags>
<PackageVersion>3.0.1</PackageVersion>
<PackageVersion>4.0.0-alpha.1</PackageVersion>
<PublishRepositoryUrl>True</PublishRepositoryUrl>
<Version>3.0.1</Version>
<Version>4.0.0-alpha.1</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
Expand All @@ -25,8 +25,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Confluent.Kafka" Version="2.3.0" />
<PackageReference Include="RockLib.Messaging" Version="4.0.1" />
<PackageReference Include="Confluent.Kafka" Version="2.8.0" />
<PackageReference Include="RockLib.Messaging" Version="5.0.0-alpha.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
</Project>
7 changes: 7 additions & 0 deletions RockLib.Messaging.NamedPipes/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 5.0.0-alpha.1 - 2025-02-03

#### Changed
- Removed .NET 6 as a target framework.
- Updated the following packages:
- RockLib.Messaging.4.0.1 -> RockLib.Messaging.5.0.0-alpha.1

## 4.0.1 - 2024-07-19

#### Changed
Expand Down
2 changes: 1 addition & 1 deletion RockLib.Messaging.NamedPipes/NamedPipeReceiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private void StartNewPipeServer()
#pragma warning restore CA1416 // Validate platform compatibility
_pipeServer.BeginWaitForConnection(WaitForConnectionCallBack, null);
}

private void WaitForConnectionCallBack(IAsyncResult result)
{
// We can assume _pipeServer will always be non-null here.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
<PackageReleaseNotes>A changelog is available at https://github.com/RockLib/RockLib.Messaging/blob/main/RockLib.Messaging.NamedPipes/CHANGELOG.md.</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageTags>rocklib messaging</PackageTags>
<PackageVersion>4.0.1</PackageVersion>
<PackageVersion>5.0.0-alpha.1</PackageVersion>
<PublishRepositoryUrl>True</PublishRepositoryUrl>
<Version>4.0.1</Version>
<Version>5.0.0-alpha.1</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="RockLib.Messaging" Version="4.0.1" />
<PackageReference Include="RockLib.Messaging" Version="5.0.0-alpha.1" />
</ItemGroup>
<ItemGroup>
<None Include="..\LICENSE.md" Pack="true" PackagePath="" />
Expand Down
7 changes: 7 additions & 0 deletions RockLib.Messaging.RabbitMQ/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 3.0.0-alpha.1 - 2025-02-03

#### Changed
- Removed .NET 6 as a target framework.
- Updated the following packages:
- RockLib.Messaging.4.0.1 -> RockLib.Messaging.5.0.0-alpha.1

## 2.0.1 - 2024-07-19

#### Changed
Expand Down
Loading