Show / Hide Table of Contents

Interface IKafkaConsumer<TMessage>

Kafka-consumer, обрабатывающий входящие сообщения.

Namespace: NotifyHub.Kafka.Interfaces
Assembly: NotifyHub.Kafka.dll
Syntax
public interface IKafkaConsumer<TMessage> where TMessage : class
Type Parameters
Name Description
TMessage

Methods

| Edit this page View Source

Close()

Закрывает Kafka-consumer и освобождает ресурсы.

Declaration
void Close()
| Edit this page View Source

ConsumeAsync(string, CancellationToken)

Получение сообщений из Kafka.

Declaration
Task<TMessage?> ConsumeAsync(string topicKey, CancellationToken cancellationToken)
Parameters
Type Name Description
string topicKey

Ключ топика из настроек

CancellationToken cancellationToken

Токен отмены операции.

Returns
Type Description
Task<TMessage>
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX