Skip to content

Commit

Permalink
update Akka.NET to 1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
eaba committed Mar 18, 2023
1 parent d3386fe commit 229417b
Show file tree
Hide file tree
Showing 78 changed files with 61 additions and 164 deletions.
1 change: 0 additions & 1 deletion Tutorials/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using DotNet.Testcontainers.Builders;
using SharpPulsar;
using SharpPulsar.Auth.OAuth2;
using SharpPulsar.Builder;
Expand Down
2 changes: 1 addition & 1 deletion Tutorials/Tutorials.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<ItemGroup>
<PackageReference Include="Spectre.Console" Version="0.46.0" />
<PackageReference Include="Testcontainers" Version="2.4.0" />
<PackageReference Include="Testcontainers" Version="3.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
using System.Threading.Tasks;
using Nuke.Common.Tools.MSBuild;
using Nuke.Common.CI.GitHubActions;
using DotNet.Testcontainers.Builders;
using Testcontainers.Pulsar;
//https://github.com/AvaloniaUI/Avalonia/blob/master/nukebuild/Build.cs
//https://github.com/cfrenzel/Eventfully/blob/master/build/Build.cs
Expand Down Expand Up @@ -153,7 +152,7 @@ partial class Build : NukeBuild
.EnableNoBuild()
.SetBlameCrash(true)
.SetBlameHang(true)
.SetBlameHangTimeout("10m")
.SetBlameHangTimeout("30m")
.EnableNoRestore()
.When(true, _ => _
.SetLoggers("console;verbosity=detailed")
Expand Down
2 changes: 1 addition & 1 deletion src/SharpPulsar.Admin/SharpPulsar.Admin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions src/SharpPulsar.Test/Fixture/PulsarCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

namespace SharpPulsar.Test.Fixture
{
using System.Threading.Tasks;
using System;
using SharpPulsar.TestContainer;
using Xunit;
using Xunit.Abstractions;

[CollectionDefinition(nameof(PulsarCollection), DisableParallelization = true)]
public class PulsarCollection : ICollectionFixture<PulsarFixture>
Expand Down
2 changes: 1 addition & 1 deletion src/SharpPulsar.Test/MultiTopicsConsumerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private async Task TestReadMessages(string topic, bool enableBatch)
await Task.Delay(TimeSpan.FromSeconds(1));
for (var i = 0; i < numKeys; i++)
{
var message = await reader.ReadNextAsync(TimeSpan.FromMicroseconds(5000)).ConfigureAwait(false);
var message = await reader.ReadNextAsync(TimeSpan.FromSeconds(60)).ConfigureAwait(false);
if (message != null)
{
_output.WriteLine($"{message.Key}:{message.MessageId}:{Encoding.UTF8.GetString(message.Data)}");
Expand Down
1 change: 0 additions & 1 deletion src/SharpPulsar.Test/OAuthTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using SharpPulsar.Interfaces;
using SharpPulsar.Schemas;
using SharpPulsar.Test.Fixture;
using SharpPulsar.TestContainer;
using Xunit;
using Xunit.Abstractions;

Expand Down
1 change: 0 additions & 1 deletion src/SharpPulsar.Test/PartitionedProducerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Threading.Tasks;
using SharpPulsar.Admin.v2;
using SharpPulsar.Builder;
using SharpPulsar.Interfaces;
using SharpPulsar.Test.Fixture;
using SharpPulsar.TestContainer;
using Xunit;
Expand Down
4 changes: 2 additions & 2 deletions src/SharpPulsar.Test/SharpPulsar.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Akka.TestKit.Xunit2" Version="1.5.0" />
<Using Include="Akka.Event"/>
<PackageReference Include="Akka.TestKit.Xunit2" Version="1.5.1" />
<Using Include="Akka.Event" />
<PackageReference Include="Castle.Core" Version="5.1.1" />
<PackageReference Include="FluentAssertions" Version="6.10.0" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1">
Expand Down
2 changes: 0 additions & 2 deletions src/SharpPulsar.Test/ZeroQueueSizeTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Akka.Actor;
using Akka.Util;
using App.Metrics.Concurrency;
using SharpPulsar.Messages.Consumer;
using System;
using System.Collections.Generic;
Expand All @@ -15,7 +14,6 @@
using SharpPulsar.Test.Fixture;
using SharpPulsar.TestContainer;
using System.Threading.Tasks;
using System.Text.Json;

/// <summary>
/// Licensed to the Apache Software Foundation (ASF) under one
Expand Down
1 change: 0 additions & 1 deletion src/SharpPulsar.TestContainer/PulsarFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Microsoft.Extensions.Configuration;
using SharpPulsar.Builder;
using SharpPulsar.Configuration;
using Xunit;

namespace SharpPulsar.TestContainer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="7.0.0" />
<PackageReference Include="polly" Version="7.2.3" />
<PackageReference Include="SharpCompress" Version="0.32.2" />
<PackageReference Include="Testcontainers" Version="2.4.0" />
<PackageReference Include="Testcontainers" Version="3.0.0" />
<PackageReference Include="xunit" Version="2.4.2" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/SharpPulsar.Trino/SharpPulsar.Trino.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Akka" Version="1.5.0" />
<PackageReference Include="Akka" Version="1.5.1" />
<PackageReference Include="HttpToSocks5Proxy" Version="1.4.0" />
<PackageReference Include="NodaTime" Version="3.1.6" />
<PackageReference Include="System.Text.Json" Version="7.0.2" />
Expand Down
1 change: 0 additions & 1 deletion src/SharpPulsar/Auth/OAuth2/ClientCredentialsFlow.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text.Json;
using SharpPulsar.Auth.OAuth2.Protocol;
Expand Down
11 changes: 5 additions & 6 deletions src/SharpPulsar/Auth/OAuth2/FlowBase.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using SharpPulsar.Auth.OAuth2.Protocol;
using SharpPulsar.Exceptions;

Expand All @@ -24,14 +23,14 @@
/// </summary>
namespace SharpPulsar.Auth.OAuth2
{


/// <summary>
/// An abstract OAuth 2.0 authorization flow.
/// </summary>

/// <summary>
/// An abstract OAuth 2.0 authorization flow.
/// </summary>
///

[Serializable]
[Serializable]
internal abstract class FlowBase : IFlow
{
public abstract void Close();
Expand Down
1 change: 0 additions & 1 deletion src/SharpPulsar/Batch/Api/IBatcherBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/// under the License.
/// </summary>

using Akka.Event;

namespace SharpPulsar.Batch.Api
{
Expand Down
2 changes: 0 additions & 2 deletions src/SharpPulsar/Batch/BatchMessageContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
using System.Buffers;
using System.Collections.Generic;
using System.IO;
using Akka.Event;
using ProtoBuf;
using SharpPulsar.Common;
using SharpPulsar.Exceptions;
using SharpPulsar.Interfaces;
using SharpPulsar.Messages;
using SharpPulsar.Protocol;
using SharpPulsar.Protocol.Proto;
using static SharpPulsar.Protocol.Commands;
Expand Down
1 change: 0 additions & 1 deletion src/SharpPulsar/Batch/BatchMessageKeyBasedContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Akka.Event;
using DotNetty.Common.Utilities;
using ProtoBuf;
using SharpPulsar.Common;
Expand Down
1 change: 0 additions & 1 deletion src/SharpPulsar/Batch/DefaultBatcherBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
/// under the License.
/// </summary>

using Akka.Event;
using SharpPulsar.Batch.Api;

namespace SharpPulsar.Batch
Expand Down
1 change: 0 additions & 1 deletion src/SharpPulsar/Batch/KeyBasedBatcherBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Akka.Event;
using SharpPulsar.Batch.Api;

/// <summary>
Expand Down
7 changes: 1 addition & 6 deletions src/SharpPulsar/Batch/ObjectCopier.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;

namespace SharpPulsar.Batch
namespace SharpPulsar.Batch
{
/// <summary>
/// Reference Article http://www.codeproject.com/KB/tips/SerializedObjectCloner.aspx
Expand Down
3 changes: 0 additions & 3 deletions src/SharpPulsar/BinaryProtoLookupService.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using Akka.Actor;
using Akka.Event;
using SharpPulsar.Common.Naming;
using SharpPulsar.Common.Partition;
using SharpPulsar.Messages;
using SharpPulsar.Messages.Requests;
using SharpPulsar.Model;
Expand All @@ -21,7 +19,6 @@
using SharpPulsar.ServiceName;
using Mode = SharpPulsar.Protocol.Proto.CommandGetTopicsOfNamespace.Mode;
using PartitionedTopicMetadata = SharpPulsar.Common.Partition.PartitionedTopicMetadata;
using ZstdNet;

/// <summary>
/// Licensed to the Apache Software Foundation (ASF) under one
Expand Down
3 changes: 0 additions & 3 deletions src/SharpPulsar/Builder/ReaderConfigBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@
using System.Collections.Generic;
using System.Linq;
using Akka.Util.Internal;
using DotNetty.Common.Utilities;
using Org.BouncyCastle.Utilities;
using SharpPulsar.Batch;
using SharpPulsar.Common;
using SharpPulsar.Common.Compression;
using SharpPulsar.Configuration;
using SharpPulsar.Interfaces;
using SharpPulsar.Precondition;
using static System.Runtime.InteropServices.JavaScript.JSType;
using Range = SharpPulsar.Common.Range;

/// <summary>
Expand Down
2 changes: 0 additions & 2 deletions src/SharpPulsar/ClientCnx.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Akka.Actor;
using Akka.Event;
using SharpPulsar.Configuration;
using SharpPulsar.Interfaces;
using SharpPulsar.Model;
Expand All @@ -21,7 +20,6 @@
using System.Net;
using SharpPulsar.SocketImpl;
using System.Threading.Tasks;
using Org.BouncyCastle.Asn1.Ocsp;

namespace SharpPulsar
{
Expand Down
2 changes: 0 additions & 2 deletions src/SharpPulsar/Configuration/ObjectMapper.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text.Json;
using Newtonsoft.Json.Linq;

Expand Down
1 change: 0 additions & 1 deletion src/SharpPulsar/Configuration/ReaderConfigurationData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Linq;
using SharpPulsar.Common.Compression;
using SharpPulsar.Interfaces;
using static System.Runtime.InteropServices.JavaScript.JSType;

/// <summary>
/// Licensed to the Apache Software Foundation (ASF) under one
Expand Down
1 change: 0 additions & 1 deletion src/SharpPulsar/ConnectionHandler.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Akka.Actor;
using Akka.Event;
using SharpPulsar.Exceptions;
using System;
using System.Threading.Tasks;
Expand Down
3 changes: 1 addition & 2 deletions src/SharpPulsar/ConnectionPool.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Akka.Actor;
using Akka.Event;
using Akka.Util.Internal;
using SharpPulsar.Configuration;
using SharpPulsar.Extension;
Expand All @@ -15,7 +14,7 @@

namespace SharpPulsar
{
public class ConnectionPool : ReceiveActor, IWithUnboundedStash
public class ConnectionPool : ReceiveActor, IWithUnboundedStash
{
private readonly Dictionary<EndPoint, Dictionary<int, ConnectionOpened>> _pool;

Expand Down
2 changes: 0 additions & 2 deletions src/SharpPulsar/ConsumerActor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Akka.Actor;
using Akka.Util;
using OpenTelemetry;
using ProtoBuf;
using SharpPulsar.Auth;
using SharpPulsar.Batch;
Expand All @@ -18,7 +17,6 @@
using SharpPulsar.Messages.Requests;
using SharpPulsar.Messages.Transaction;
using SharpPulsar.Precondition;
using SharpPulsar.Protocol;
using SharpPulsar.Protocol.Proto;
using SharpPulsar.Shared;
using SharpPulsar.Stats.Consumer;
Expand Down
10 changes: 3 additions & 7 deletions src/SharpPulsar/ConsumerActorBase.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using Akka.Actor;
using Akka.Dispatch;
using Akka.Event;
using Akka.Util;
using Akka.Util.Internal;
using SharpPulsar.Batch.Api;
using SharpPulsar.Configuration;
using SharpPulsar.EventSource.Messages;
using SharpPulsar.Exceptions;
using SharpPulsar.Extension;
using SharpPulsar.Interfaces;
Expand All @@ -17,8 +15,6 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using System.Threading.Tasks.Dataflow;
Expand Down Expand Up @@ -924,15 +920,15 @@ private void Push(IMessage<T> o)
{
//IncomingMessages.Post(o);
Context.Parent.Tell(new ReceivedMessage<T>(o));
_log.Info($"Pushed message with sequnceid {o.SequenceId} (topic:{Topic}) to consumer parent");
_log.Info($"Pushed message with SequenceId {o.SequenceId} (topic:{Topic}) to consumer parent");

}
else
{
if (IncomingMessages.Post(o))
_log.Info($"Added message with sequnceid {o.SequenceId} (key:{o.Key}) to IncomingMessages. Message Count: {IncomingMessages.Count}");
_log.Info($"Added message with SequenceId {o.SequenceId} (key:{o.Key}) to IncomingMessages. Message Count: {IncomingMessages.Count}");
else
_log.Info($"Failed to add message with sequnceid {o.SequenceId} to IncomingMessages");
_log.Info($"Failed to add message with SequenceId {o.SequenceId} to IncomingMessages");
}
}
}
Expand Down
11 changes: 5 additions & 6 deletions src/SharpPulsar/ConsumerInterceptors.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using Akka.Actor;
using Akka.Event;

using SharpPulsar.Interfaces;

Expand All @@ -25,11 +24,11 @@
/// </summary>
namespace SharpPulsar
{
/// <summary>
/// A container that hold the list <seealso cref="IConsumerInterceptor{T}"/> and wraps calls to the chain
/// of custom interceptors.
/// </summary>
public class ConsumerInterceptors<T> : IDisposable
/// <summary>
/// A container that hold the list <seealso cref="IConsumerInterceptor{T}"/> and wraps calls to the chain
/// of custom interceptors.
/// </summary>
public class ConsumerInterceptors<T> : IDisposable
{
private readonly ILoggingAdapter _log;

Expand Down
1 change: 0 additions & 1 deletion src/SharpPulsar/Crypto/MessageCrypto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using Akka.Event;
using Org.BouncyCastle.Security;

using SharpPulsar.Cache;
Expand Down
1 change: 0 additions & 1 deletion src/SharpPulsar/DefaultImplementation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using NodaTime;
using SharpPulsar.Shared;
using SharpPulsar.Schemas.Generic;
using Akka.Event;
using SharpPulsar.Interfaces.Schema;

/// <summary>
Expand Down
Loading

0 comments on commit 229417b

Please sign in to comment.