@@ -17,7 +17,7 @@ internal class Consumer : IConsumer
17
17
private readonly ILogHandler _logHandler ;
18
18
private readonly bool _stopTheWorldStrategy ;
19
19
20
- private readonly List < Action < IDependencyResolver , IConsumer < byte [ ] , byte [ ] > , List < TopicPartition > > >
20
+ private readonly List < Action < IDependencyResolver , IConsumer < byte [ ] , byte [ ] > , List < Confluent . Kafka . TopicPartition > > >
21
21
_partitionsAssignedHandlers = new ( ) ;
22
22
23
23
private readonly List < Action < IDependencyResolver , IConsumer < byte [ ] , byte [ ] > ,
@@ -26,7 +26,7 @@ private readonly List<Action<IDependencyResolver, IConsumer<byte[], byte[]>, Lis
26
26
27
27
private readonly List < Action < IConsumer < byte [ ] , byte [ ] > , Error > > _errorsHandlers = new ( ) ;
28
28
private readonly List < Action < IConsumer < byte [ ] , byte [ ] > , string > > _statisticsHandlers = new ( ) ;
29
- private readonly ConcurrentDictionary < TopicPartition , long > _currentPartitionsOffsets = new ( ) ;
29
+ private readonly ConcurrentDictionary < Confluent . Kafka . TopicPartition , long > _currentPartitionsOffsets = new ( ) ;
30
30
private readonly ConsumerFlowManager _flowManager ;
31
31
private readonly Event _maxPollIntervalExceeded ;
32
32
@@ -71,7 +71,7 @@ public Consumer(
71
71
72
72
public IReadOnlyList < string > Subscription { get ; private set ; } = new List < string > ( ) ;
73
73
74
- public IReadOnlyList < TopicPartition > Assignment { get ; private set ; } = new List < TopicPartition > ( ) ;
74
+ public IReadOnlyList < Confluent . Kafka . TopicPartition > Assignment { get ; private set ; } = new List < Confluent . Kafka . TopicPartition > ( ) ;
75
75
76
76
public IConsumerFlowManager FlowManager => _flowManager ;
77
77
@@ -101,7 +101,7 @@ public ConsumerStatus Status
101
101
}
102
102
}
103
103
104
- public void OnPartitionsAssigned ( Action < IDependencyResolver , IConsumer < byte [ ] , byte [ ] > , List < TopicPartition > > handler ) =>
104
+ public void OnPartitionsAssigned ( Action < IDependencyResolver , IConsumer < byte [ ] , byte [ ] > , List < Confluent . Kafka . TopicPartition > > handler ) =>
105
105
_partitionsAssignedHandlers . Add ( handler ) ;
106
106
107
107
public void OnPartitionsRevoked (
@@ -114,13 +114,13 @@ public void OnError(Action<IConsumer<byte[], byte[]>, Error> handler) =>
114
114
public void OnStatistics ( Action < IConsumer < byte [ ] , byte [ ] > , string > handler ) =>
115
115
_statisticsHandlers . Add ( handler ) ;
116
116
117
- public Offset GetPosition ( TopicPartition topicPartition ) =>
117
+ public Offset GetPosition ( Confluent . Kafka . TopicPartition topicPartition ) =>
118
118
_consumer . Position ( topicPartition ) ;
119
119
120
- public WatermarkOffsets GetWatermarkOffsets ( TopicPartition topicPartition ) =>
120
+ public WatermarkOffsets GetWatermarkOffsets ( Confluent . Kafka . TopicPartition topicPartition ) =>
121
121
_consumer . GetWatermarkOffsets ( topicPartition ) ;
122
122
123
- public WatermarkOffsets QueryWatermarkOffsets ( TopicPartition topicPartition , TimeSpan timeout ) =>
123
+ public WatermarkOffsets QueryWatermarkOffsets ( Confluent . Kafka . TopicPartition topicPartition , TimeSpan timeout ) =>
124
124
_consumer . QueryWatermarkOffsets ( topicPartition , timeout ) ;
125
125
126
126
public List < Confluent . Kafka . TopicPartitionOffset > OffsetsForTimes (
@@ -286,7 +286,7 @@ private void ManualAssign(IEnumerable<TopicPartitions> topics)
286
286
var partitions = topics
287
287
. SelectMany (
288
288
topic => topic . Partitions . Select (
289
- partition => new TopicPartition ( topic . Name , new Partition ( partition ) ) ) )
289
+ partition => new Confluent . Kafka . TopicPartition ( topic . Name , new Partition ( partition ) ) ) )
290
290
. ToList ( ) ;
291
291
292
292
_consumer . Assign ( partitions ) ;
@@ -295,7 +295,7 @@ private void ManualAssign(IEnumerable<TopicPartitions> topics)
295
295
296
296
private void FirePartitionsAssignedHandlers (
297
297
IConsumer < byte [ ] , byte [ ] > consumer ,
298
- List < TopicPartition > partitions )
298
+ List < Confluent . Kafka . TopicPartition > partitions )
299
299
{
300
300
if ( _stopTheWorldStrategy )
301
301
{
@@ -323,7 +323,7 @@ private void FirePartitionRevokedHandlers(IConsumer<byte[], byte[]> consumer, Li
323
323
if ( _stopTheWorldStrategy )
324
324
{
325
325
_partitionsRevokedHandlers . ForEach ( handler => handler ( _dependencyResolver , consumer , partitions ) ) ;
326
- this . Assignment = new List < TopicPartition > ( ) ;
326
+ this . Assignment = new List < Confluent . Kafka . TopicPartition > ( ) ;
327
327
this . Subscription = new List < string > ( ) ;
328
328
_currentPartitionsOffsets . Clear ( ) ;
329
329
_flowManager . Stop ( ) ;
0 commit comments