Show / Hide Table of Contents

Class KafkaMessageConsumer

Inheritance
System.Object
KafkaMessageConsumer
Implements
IKafkaMessageConsumer
ITransientDependency
IDisposable
Namespace: Volo.Abp.Kafka
Assembly: Volo.Abp.Kafka.dll
Syntax
public class KafkaMessageConsumer : object, IKafkaMessageConsumer, ITransientDependency, IDisposable

Constructors

KafkaMessageConsumer(IConsumerPool, IExceptionNotifier, IOptions<AbpKafkaOptions>)

Declaration
public KafkaMessageConsumer(IConsumerPool consumerPool, IExceptionNotifier exceptionNotifier, IOptions<AbpKafkaOptions> options)
Parameters
Type Name Description
IConsumerPool consumerPool
IExceptionNotifier exceptionNotifier
IOptions<AbpKafkaOptions> options

Properties

Callbacks

Declaration
protected ConcurrentBag<Func<Message<string, byte[]>, Task>> Callbacks { get; }
Property Value
Type Description
ConcurrentBag<Func<Message<System.String, System.Byte[]>, Task>>

ConnectionName

Declaration
protected string ConnectionName { get; }
Property Value
Type Description
System.String

Consumer

Declaration
protected IConsumer<string, byte[]> Consumer { get; }
Property Value
Type Description
IConsumer<System.String, System.Byte[]>

ConsumerPool

Declaration
protected IConsumerPool ConsumerPool { get; }
Property Value
Type Description
IConsumerPool

ExceptionNotifier

Declaration
protected IExceptionNotifier ExceptionNotifier { get; }
Property Value
Type Description
IExceptionNotifier

GroupId

Declaration
protected string GroupId { get; }
Property Value
Type Description
System.String

Logger

Declaration
public ILogger<KafkaMessageConsumer> Logger { get; set; }
Property Value
Type Description
ILogger<KafkaMessageConsumer>

Options

Declaration
protected AbpKafkaOptions Options { get; }
Property Value
Type Description
AbpKafkaOptions

TopicName

Declaration
protected string TopicName { get; }
Property Value
Type Description
System.String

Methods

Consume()

Declaration
protected virtual void Consume()

CreateTopicAsync()

Declaration
protected virtual Task CreateTopicAsync()
Returns
Type Description
Task

Dispose()

Declaration
public virtual void Dispose()

HandleIncomingMessage(ConsumeResult<String, Byte[]>)

Declaration
protected virtual Task HandleIncomingMessage(ConsumeResult<string, byte[]> consumeResult)
Parameters
Type Name Description
ConsumeResult<System.String, System.Byte[]> consumeResult
Returns
Type Description
Task

Initialize(String, String, String)

Declaration
public virtual void Initialize(string topicName, string groupId, string connectionName = null)
Parameters
Type Name Description
System.String topicName
System.String groupId
System.String connectionName

OnMessageReceived(Func<Message<String, Byte[]>, Task>)

Declaration
public virtual void OnMessageReceived(Func<Message<string, byte[]>, Task> callback)
Parameters
Type Name Description
Func<Message<System.String, System.Byte[]>, Task> callback

Implements

IKafkaMessageConsumer
ITransientDependency
IDisposable

Extension Methods

AbpObjectExtensions.As<T>(Object)
AbpObjectExtensions.To<T>(Object)
AbpObjectExtensions.IsIn<T>(T, T[])
AbpObjectExtensions.If<T>(T, Boolean, Func<T, T>)
AbpObjectExtensions.If<T>(T, Boolean, Action<T>)
LockExtensions.Locking(Object, Action)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<TResult>(Object, Func<TResult>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
Back to top Powered by Volosoft