C# Class Streamiz.Kafka.Net.Mock.TestOutputTopic

TestOutputTopic{K, V} is used to read records from a topic in TopologyTestDriver and it's NOT THREADSAFE. To use TestOutputTopic{K, V} create a new instance via TopologyTestDriver.CreateOuputTopic{K, V}(string). In actual test code, you can read record values, keys, keyvalue or list of keyvalue. If you have multiple source topics, you need to create a TestOutputTopic{K, V} for each. Processing records var outputTopic = builder.CreateOuputTopic<string, string>("test-output", TimeSpan.FromSeconds(5)); var kv = outputTopic.ReadKeyValue(); DO ASSERT HERE
Afficher le fichier Open project: LGouellec/kafka-streams-dotnet Class Usage Examples

Private Properties

Свойство Type Description
ReadRecord V>.ConsumeResult
TestOutputTopic Confluent.Kafka
TestOutputTopic Confluent.Kafka

Méthodes publiques

Méthode Description
ReadKeyValue ( ) : V>.ConsumeResult

Read one record from the output topic and return its key and value as pair.

ReadKeyValueList ( ) : V>>.IEnumerable

Read all records from topic to List.

ReadValue ( ) : V

Read one record from the output topic and return record's value.

ReadValueList ( ) : IEnumerable

Read all values from topic to List.

Private Methods

Méthode Description
ReadRecord ( ) : V>.ConsumeResult
TestOutputTopic ( ) : Confluent.Kafka
TestOutputTopic ( IPipeOutput pipe, IStreamConfig configuration, ISerDes keySerdes, ISerDes valueSerdes ) : Confluent.Kafka

Method Details

ReadKeyValue() public méthode

Read one record from the output topic and return its key and value as pair.
public ReadKeyValue ( ) : V>.ConsumeResult
Résultat V>.ConsumeResult

ReadKeyValueList() public méthode

Read all records from topic to List.
public ReadKeyValueList ( ) : V>>.IEnumerable
Résultat V>>.IEnumerable

ReadValue() public méthode

Read one record from the output topic and return record's value.
public ReadValue ( ) : V
Résultat V

ReadValueList() public méthode

Read all values from topic to List.
public ReadValueList ( ) : IEnumerable
Résultat IEnumerable