Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

WIP - Updating packages. #266

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.14.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.9" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="AutoFixture" Version="4.16.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
9 changes: 8 additions & 1 deletion src/OpenMessage.AWS.SNS/OpenMessage.AWS.SNS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@

<ItemGroup>
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.7.0.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace OpenMessage.AWS.SQS.Configuration
{
internal sealed class SqsConsumerBuilder<T> : Builder, ISqsConsumerBuilder<T>
internal sealed class SqsConsumerBuilder<T> : Builder, ISqsConsumerBuilder<T> where T : class
{
private Action<HostBuilderContext, SQSConsumerOptions>? _configuration;

Expand Down
2 changes: 1 addition & 1 deletion src/OpenMessage.AWS.SQS/ISqsConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace OpenMessage.AWS.SQS
{
internal interface ISqsConsumer<T>
internal interface ISqsConsumer<T> where T : class
{
Task<List<SqsMessage<T>>> ConsumeAsync(CancellationToken cancellationToken);
void Initialize(string consumerId, CancellationToken cancellationToken);
Expand Down
9 changes: 8 additions & 1 deletion src/OpenMessage.AWS.SQS/OpenMessage.AWS.SQS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@

<ItemGroup>
<PackageReference Include="AWSSDK.SQS" Version="3.7.0.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/OpenMessage.AWS.SQS/SqsConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace OpenMessage.AWS.SQS
{
internal sealed class SqsConsumer<T> : ISqsConsumer<T>
internal sealed class SqsConsumer<T> : ISqsConsumer<T> where T : class
{
private static readonly string MisconfiguredConsumerMessage = "Consumer has not been initialized. Please call Initialize with the configured consumer id.";
private readonly IDeserializationProvider _deserializationProvider;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenMessage.AWS.SQS/SqsDispatcherService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected override async Task ExecuteAsync(CancellationToken cancellationToken)
continue;

var readMessage = channel.Reader.TryRead(out var msg);
if (readMessage)
if (readMessage && msg != null)
messagesToSend.Add(msg);

if (messagesToSend.Count == 10 || messagesToSend.Count > 0 && !readMessage)
Expand Down
2 changes: 1 addition & 1 deletion src/OpenMessage.AWS.SQS/SqsMessagePump.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace OpenMessage.AWS.SQS
{
internal sealed class SqsMessagePump<T> : MessagePump<T>
internal sealed class SqsMessagePump<T> : MessagePump<T> where T : class
{
private readonly string _consumerId;
private readonly IQueueMonitor<T> _queueMonitor;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenMessage.AWS.SQS/SqsServiceExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static class SqsServiceExtensions
/// <param name="messagingBuilder">The host the consumer belongs to</param>
/// <typeparam name="T">The type of message to consume</typeparam>
/// <returns>An SQS consumer builder</returns>
public static ISqsConsumerBuilder<T> ConfigureSqsConsumer<T>(this IMessagingBuilder messagingBuilder) => new SqsConsumerBuilder<T>(messagingBuilder);
public static ISqsConsumerBuilder<T> ConfigureSqsConsumer<T>(this IMessagingBuilder messagingBuilder) where T : class => new SqsConsumerBuilder<T>(messagingBuilder);

/// <summary>
/// Returns an SQS dispatcher builder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
Expand All @@ -8,7 +8,7 @@

namespace OpenMessage.Apache.Kafka.Configuration
{
internal sealed class KafkaConsumerBuilder<TKey, TValue> : Builder, IKafkaConsumerBuilder<TKey, TValue>
internal sealed class KafkaConsumerBuilder<TKey, TValue> : Builder, IKafkaConsumerBuilder<TKey, TValue> where TKey : class where TValue : class
{
private Action<HostBuilderContext, KafkaOptions>? _options;

Expand Down
4 changes: 2 additions & 2 deletions src/OpenMessage.Apache.Kafka/IKafkaConsumer.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Threading;
using System.Threading;
using System.Threading.Tasks;

namespace OpenMessage.Apache.Kafka
{
internal interface IKafkaConsumer<TKey, TValue>
internal interface IKafkaConsumer<TKey, TValue> where TKey : class where TValue : class
{
Task<KafkaMessage<TKey, TValue>?> ConsumeAsync(CancellationToken cancellationToken);
void Start(string consumerId);
Expand Down
2 changes: 1 addition & 1 deletion src/OpenMessage.Apache.Kafka/KafkaConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace OpenMessage.Apache.Kafka
{
internal sealed class KafkaConsumer<TKey, TValue> : KafkaClient, IKafkaConsumer<TKey, TValue>
internal sealed class KafkaConsumer<TKey, TValue> : KafkaClient, IKafkaConsumer<TKey, TValue> where TKey : class where TValue : class
{
private static readonly string TimestampFormat = "o";
private readonly Action<KafkaMessage<TKey, TValue>> _acknowledgementAction;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenMessage.Apache.Kafka/KafkaDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Headers HeadersIncludingDefaults(Headers h, Message<T> msg, bool contentType = f
if (!valueType && aqn is {})
h.Add(KnownProperties.ValueTypeName, Encoding.UTF8.GetBytes(aqn));

if (Activity.Current is {})
if (Activity.Current is {} && !string.IsNullOrEmpty(Activity.Current.Id))
h.Add(KnownProperties.ActivityId, Encoding.UTF8.GetBytes(Activity.Current.Id));

return h;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenMessage.Apache.Kafka/KafkaMessagePump.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace OpenMessage.Apache.Kafka.HostedServices
{
internal sealed class KafkaMessagePump<TKey, TValue> : MessagePump<TValue>
internal sealed class KafkaMessagePump<TKey, TValue> : MessagePump<TValue> where TKey : class where TValue : class
{
private readonly string _consumerId;
private readonly IKafkaConsumer<TKey, TValue> _kafkaConsumer;
Expand Down
6 changes: 3 additions & 3 deletions src/OpenMessage.Apache.Kafka/KafkaServiceExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using OpenMessage;
Expand All @@ -19,7 +19,7 @@ public static class KafkaServiceExtensions
/// <param name="messagingBuilder">The host builder</param>
/// <typeparam name="T">The type to consume</typeparam>
/// <returns>The modified builder</returns>
public static IKafkaConsumerBuilder<string, T> ConfigureKafkaConsumer<T>(this IMessagingBuilder messagingBuilder) => messagingBuilder.ConfigureKafkaConsumer<string, T>();
public static IKafkaConsumerBuilder<string, T> ConfigureKafkaConsumer<T>(this IMessagingBuilder messagingBuilder) where T : class => messagingBuilder.ConfigureKafkaConsumer<string, T>();

/// <summary>
/// Adds a kafka consumer
Expand All @@ -28,7 +28,7 @@ public static class KafkaServiceExtensions
/// <typeparam name="TKey">The type of the key</typeparam>
/// <typeparam name="TValue">The type of the message</typeparam>
/// <returns>The modified builder</returns>
public static IKafkaConsumerBuilder<TKey, TValue> ConfigureKafkaConsumer<TKey, TValue>(this IMessagingBuilder messagingBuilder) => new KafkaConsumerBuilder<TKey, TValue>(messagingBuilder);
public static IKafkaConsumerBuilder<TKey, TValue> ConfigureKafkaConsumer<TKey, TValue>(this IMessagingBuilder messagingBuilder) where TKey : class where TValue : class => new KafkaConsumerBuilder<TKey, TValue>(messagingBuilder);

/// <summary>
/// Adds a kafka dispatcher
Expand Down
9 changes: 8 additions & 1 deletion src/OpenMessage.Apache.Kafka/OpenMessage.Apache.Kafka.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Confluent.Kafka" Version="1.5.1" />
<PackageReference Include="Confluent.Kafka" Version="1.6.3" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.EventHubs" Version="4.3.0" />
<PackageReference Include="Microsoft.Azure.EventHubs" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.0.0" />
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.1.2" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
9 changes: 8 additions & 1 deletion src/OpenMessage.EventStore/OpenMessage.EventStore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EventStore.Client" Version="20.6.1" />
<PackageReference Include="EventStore.Client" Version="21.2.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
7 changes: 7 additions & 0 deletions src/OpenMessage.MediatR/OpenMessage.MediatR.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
9 changes: 8 additions & 1 deletion src/OpenMessage.NATS/OpenMessage.NATS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NATS.Client" Version="0.11.0" />
<PackageReference Include="NATS.Client" Version="0.12.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
7 changes: 7 additions & 0 deletions src/OpenMessage.Polly/OpenMessage.Polly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@
<ItemGroup>
<PackageReference Include="Polly" Version="7.2.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
7 changes: 7 additions & 0 deletions src/OpenMessage.RabbitMq/OpenMessage.RabbitMq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@
<PackageReference Include="RabbitMQ.Client" Version="6.2.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
9 changes: 8 additions & 1 deletion src/OpenMessage.Redis/OpenMessage.Redis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="StackExchange.Redis" Version="2.1.58" />
<PackageReference Include="StackExchange.Redis" Version="2.2.4" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/OpenMessage.Serializer.Hyperion/HyperionSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ public string AsString<T>(T entity)
return Convert.ToBase64String(AsBytes(entity));
}

public T From<T>(string data, Type messageType)
public T? From<T>(string data, Type messageType) where T : class
{
if (string.IsNullOrWhiteSpace(data))
Throw.ArgumentException(nameof(data), "Cannot be null, empty or whitespace");

return From<T>(Convert.FromBase64String(data), messageType);
}

public T From<T>(byte[] data, Type messageType)
public T? From<T>(byte[] data, Type messageType) where T : class
{
if (data is null || data.Length == 0)
Throw.ArgumentException(nameof(data), "Cannot be null or empty");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Hyperion" Version="0.9.16" />
<PackageReference Include="Hyperion" Version="0.9.17" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions src/OpenMessage.Serializer.Jil/JilSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ public string AsString<T>(T entity)
return JSON.Serialize(entity);
}

public T From<T>(string data, Type messageType)
public T? From<T>(string data, Type messageType) where T : class
{
if (string.IsNullOrWhiteSpace(data))
Throw.ArgumentException(nameof(data), "Cannot be null, empty or whitespace");

return (T)JSON.Deserialize(data, messageType);
return (T?)JSON.Deserialize(data, messageType);
}

public T From<T>(byte[] data, Type messageType)
public T? From<T>(byte[] data, Type messageType) where T : class
{
if (data is null || data.Length == 0)
Throw.ArgumentException(nameof(data), "Cannot be null or empty");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@
<PackageReference Include="Jil" Version="2.17.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MinVer" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
Loading