entvex commented on code in PR #162:
URL: https://github.com/apache/pulsar-dotpulsar/pull/162#discussion_r1253108841
##########
src/DotPulsar/Internal/Consumer.cs:
##########
@@ -17,56 +17,103 @@ namespace DotPulsar.Internal;
using DotPulsar.Abstractions;
using DotPulsar.Exceptions;
using DotPulsar.Internal.Abstractions;
+using DotPulsar.Internal.Compression;
using DotPulsar.Internal.Events;
using DotPulsar.Internal.Extensions;
using DotPulsar.Internal.PulsarApi;
using Microsoft.Extensions.ObjectPool;
using System;
+using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-public sealed class Consumer<TMessage> : IContainsChannel, IConsumer<TMessage>
+public sealed class Consumer<TMessage> : IConsumer<TMessage>
{
- private readonly Guid _correlationId;
- private readonly IRegisterEvent _eventRegister;
- private IConsumerChannel<TMessage> _channel;
- private readonly ObjectPool<CommandAck> _commandAckPool;
+ private readonly IConnectionPool _connectionPool;
+ private readonly ProcessManager _processManager;
+ private readonly StateManager<ConsumerState> _state;
+ private readonly ConsumerOptions<TMessage> _options;
+ private readonly ConcurrentDictionary<string, SubConsumer<TMessage>>
_subConsumers;
+ private readonly CancellationTokenSource _cts;
+ private readonly IHandleException _exceptionHandler;
private readonly IExecute _executor;
- private readonly IStateChanged<ConsumerState> _state;
- private readonly IConsumerChannelFactory<TMessage> _factory;
private int _isDisposed;
- private Exception? _faultException;
+ private bool _isPartitioned;
+ private uint _numberOfPartitions;
+ private Task<IMessage<TMessage>>?[] _receiveTaskQueueForSubConsumers;
+ private int _subConsumerIndex;
+ private Exception? _faultException; //TODO This is not used. Is that bad ?
Review Comment:
This can be removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]