Show / Hide Table of Contents

Interface IKafkaProducer<TMessage>

Kafka-producer сообщений

Namespace: NotifyHub.Kafka.Interfaces
Assembly: NotifyHub.Kafka.dll
Syntax
public interface IKafkaProducer<in TMessage>
Type Parameters
Name Description
TMessage

Тип отправляемого сообщения.

Methods

| Edit this page View Source

ProduceAsync(string, string, TMessage, CancellationToken)

Отправляет сообщение в Kafka.

Declaration
Task ProduceAsync(string topicKey, string key, TMessage message, CancellationToken cancellationToken)
Parameters
Type Name Description
string topicKey

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

string key

Ключ маршрутизации

TMessage message

Сообщение для отправки.

CancellationToken cancellationToken

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

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