Skip to content

Commit 1be2814

Browse files
authored
Merge pull request #727 from xlegalles/GetRidOfGrpcCore
refactor: get rid of Grpc.core dependency into ZeebeClient
2 parents f2f972b + 48b75c0 commit 1be2814

File tree

3 files changed

+4
-23
lines changed

3 files changed

+4
-23
lines changed

Client.UnitTests/Client.UnitTests.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
2525
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
2626
<PackageReference Update="StyleCop.Analyzers" Version="1.1.118" />
27+
<PackageReference Include="Grpc" version="2.46.6" />
2728
</ItemGroup>
2829

2930
<ItemGroup>

Client/Client.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ This release is based on the Zeebe 8.5.6 release (https://github.com/zeebe-io/ze
3838

3939
<ItemGroup>
4040
<PackageReference Include="Google.Protobuf" version="3.28.2" />
41-
<PackageReference Include="Grpc" version="2.46.6" />
4241
<PackageReference Include="Grpc.Auth" Version="2.66.0" />
4342
<PackageReference Include="Grpc.Net.Client" Version="2.66.0" />
4443
<PackageReference Include="Grpc.Tools" version="2.67.0">

Client/ZeebeClient.cs

+3-22
Original file line numberDiff line numberDiff line change
@@ -135,28 +135,9 @@ public override AsyncUnaryCall<TResponse> AsyncUnaryCall<TRequest, TResponse>(TR
135135
}
136136
}
137137

138-
/// <summary>
139-
/// Adds keepAlive options to the channel options.
140-
/// </summary>
141-
/// <param name="channelOptions">the current existing channel options.</param>
142-
private void AddKeepAliveToChannelOptions(List<ChannelOption> channelOptions, TimeSpan? keepAlive)
143-
{
144-
// GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS
145-
// This channel argument if set to 1 (0 : false; 1 : true), allows keepalive pings to be sent even if there are no calls in flight.
146-
// channelOptions.Add(new ChannelOption("grpc.keepalive_permit_without_calls", "1"));
147-
// this will increase load on the system and also increase used resources
148-
// we should prefer idleTimeout setting
149-
// https://stackoverflow.com/questions/57930529/grpc-connection-use-keepalive-or-idletimeout
150-
151-
// GRPC_ARG_KEEPALIVE_TIME_MS
152-
// This channel argument controls the period (in milliseconds) after which a keepalive ping is sent on the transport.
153-
var actualKeepAlive = keepAlive.GetValueOrDefault(DefaultKeepAlive);
154-
channelOptions.Add(new ChannelOption("grpc.keepalive_time_ms", (int) actualKeepAlive.TotalMilliseconds));
155-
}
156-
157-
////////////////////////////////////////////////////////////////////////
158-
///////////////////////////// JOBS /////////////////////////////////////
159-
////////////////////////////////////////////////////////////////////////
138+
////////////////////////////////////////////////////////////////////////
139+
///////////////////////////// JOBS /////////////////////////////////////
140+
////////////////////////////////////////////////////////////////////////
160141

161142
public IJobWorkerBuilderStep1 NewWorker()
162143
{

0 commit comments

Comments
 (0)