Interface IConsumer<K, V, TJVMK, TJVMV>
KNet extension of IConsumer<K, V>
public interface IConsumer<K, V, TJVMK, TJVMV> : IConsumer<TJVMK, TJVMV>, IConsumer, IJVMBridgeBase, IJVMBridgeBaseInstance, IJVMBridgeDefinition, IDisposable, ICloseable, IAutoCloseable
Type Parameters
KThe key type
VThe value type
TJVMKThe JVM type of
KTJVMVThe JVM type of
V
- Inherited Members
- Extension Methods
Properties
IsCompleting
true if the IConsumer<K, V, TJVMK, TJVMV> instance is completing async operation
bool IsCompleting { get; }
Property Value
IsEmpty
true if the IConsumer<K, V, TJVMK, TJVMV> instance has an empty set of items in async operation
bool IsEmpty { get; }
Property Value
WaitingBatches
Number of message batches in the IConsumer<K, V, TJVMK, TJVMV> instance waiting to be processed in async operation
int WaitingBatches { get; }
Property Value
WaitingMessages
Number of messages in the IConsumer<K, V, TJVMK, TJVMV> instance waiting to be processed in async operation
[Obsolete("Use WaitingBatches")]
int WaitingMessages { get; }
Property Value
Methods
Consume(long, Func<ConsumerRecord<K, V, TJVMK, TJVMV>, bool>)
KNet sync extension for Poll(Duration)
void Consume(long timeoutMs, Func<ConsumerRecord<K, V, TJVMK, TJVMV>, bool> callback)
Parameters
timeoutMslongTimeout in milliseconds
callbackFunc<ConsumerRecord<K, V, TJVMK, TJVMV>, bool>The Func<T, TResult> where receive ConsumerRecord<K, V, TJVMK, TJVMV>; return true from
callbackto dispose the object
ConsumeAsync(long)
KNet async extension for Poll(Duration)
bool ConsumeAsync(long timeoutMs)
Parameters
timeoutMslongTimeout in milliseconds
Returns
Poll(long)
KNet extension for Poll(Duration)
ConsumerRecords<K, V, TJVMK, TJVMV> Poll(long timeoutMs)
Parameters
timeoutMslongTimeout in milliseconds
Returns
- ConsumerRecords<K, V, TJVMK, TJVMV>
Poll(TimeSpan)
KNet extension for Poll(Duration)
ConsumerRecords<K, V, TJVMK, TJVMV> Poll(TimeSpan timeout)
Parameters
Returns
- ConsumerRecords<K, V, TJVMK, TJVMV>
SetCallback(Func<ConsumerRecord<K, V, TJVMK, TJVMV>, bool>, Action<Exception>)
Sets the Func<T, TResult> to use to receive the ConsumerRecord<K, V, TJVMK, TJVMV>
void SetCallback(Func<ConsumerRecord<K, V, TJVMK, TJVMV>, bool> cb, Action<Exception> exceptionCallback = null)
Parameters
cbFunc<ConsumerRecord<K, V, TJVMK, TJVMV>, bool>The callback Func<T, TResult>
exceptionCallbackAction<Exception>The callback receiving Exception thrown in async operations