Table of Contents

Class MockConsumer<K, V>

Namespace
Org.Apache.Kafka.Clients.Consumer
Assembly
MASES.KNet.dll
public class MockConsumer<K, V> : Consumer<K, V>, IDynamicMetaObjectProvider, IJVMBridgeCore, IJVMBridgeBaseStatic, IConsumer<K, V>, IConsumer, IJVMBridgeBase, IJVMBridgeDefinition, IDisposable, ICloseable, IAutoCloseable

Type Parameters

K
V
Inheritance
JVMBridgeBase
JVMBridgeBase<AutoCloseable>
Consumer<K, V>
MockConsumer<K, V>
Implements
IJVMBridgeCore
IJVMBridgeBaseStatic
IConsumer<K, V>
IJVMBridgeBase
IJVMBridgeDefinition
Inherited Members
JVMBridgeBase<AutoCloseable>.IsAssignableFrom(IJavaType)
JVMBridgeBase<AutoCloseable>.IsAssignableFrom<T>()
JVMBridgeBase<AutoCloseable>.Execute<T>(params T[])
JVMBridgeBase<AutoCloseable>.DynBridgeClazz
JVMBridgeBase<AutoCloseable>.BridgeClazz
JVMBridgeBase.RuntimeClassNameOf<T>()
JVMBridgeBase.ClassNameOf<T>()
JVMBridgeBase.ClassOf<T>()
JVMBridgeBase.WrapsDirect<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn, TConverter>(IJavaObject)
JVMBridgeBase.MonitorEnter()
JVMBridgeBase.MonitorExit()
JVMBridgeBase.IsInstanceOf(IJavaType)
JVMBridgeBase.IsInstanceOf<T>()
JVMBridgeBase.RuntimeIsInstanceOf<T>()
JVMBridgeBase.CastTo<TNewClass>()
JVMBridgeBase.CastDirect<TNewClass>()
JVMBridgeBase.Dispose()
JVMBridgeBase.ToString()
JVMBridgeBase.GetHashCode()
JVMBridgeBase.Notify()
JVMBridgeBase.NotifyAll()
JVMBridgeBase.Wait()
JVMBridgeBase.DynBridgeInstance
JVMBridgeBase.BridgeInstance
JVMBridgeBase.IsBridgeListener
Extension Methods

Constructors

MockConsumer()

Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge

public MockConsumer()

MockConsumer(OffsetResetStrategy)

public MockConsumer(OffsetResetStrategy arg0)

Parameters

arg0 OffsetResetStrategy

OffsetResetStrategy

MockConsumer(params object[])

Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class

public MockConsumer(params object[] args)

Parameters

args object[]

Properties

BridgeClassName

public override string BridgeClassName { get; }

Property Value

string

IsBridgeAbstract

public override bool IsBridgeAbstract { get; }

Property Value

bool

IsBridgeCloseable

public override bool IsBridgeCloseable { get; }

Property Value

bool

IsBridgeInterface

public override bool IsBridgeInterface { get; }

Property Value

bool

IsBridgeStatic

public override bool IsBridgeStatic { get; }

Property Value

bool

Methods

AddRecord(ConsumerRecord<K, V>)

public void AddRecord(ConsumerRecord<K, V> arg0)

Parameters

arg0 ConsumerRecord<K, V>

ConsumerRecord

Assign(Collection<TopicPartition>)

public void Assign(Collection<TopicPartition> arg0)

Parameters

arg0 Collection<TopicPartition>

Collection

Assignment()

public Set<TopicPartition> Assignment()

Returns

Set<TopicPartition>

Set

BeginningOffsets(Collection<TopicPartition>)

public Map<TopicPartition, Long> BeginningOffsets(Collection<TopicPartition> arg0)

Parameters

arg0 Collection<TopicPartition>

Collection

Returns

Map<TopicPartition, Long>

Map

BeginningOffsets(Collection<TopicPartition>, Duration)

public Map<TopicPartition, Long> BeginningOffsets(Collection<TopicPartition> arg0, Duration arg1)

Parameters

arg0 Collection<TopicPartition>

Collection

arg1 Duration

Duration

Returns

Map<TopicPartition, Long>

Map

ClientInstanceId(Duration)

public Uuid ClientInstanceId(Duration arg0)

Parameters

arg0 Duration

Duration

Returns

Uuid

Uuid

Close()

public void Close()

Close(Duration)

public void Close(Duration arg0)

Parameters

arg0 Duration

Duration

Closed()

public bool Closed()

Returns

bool

bool

CommitAsync()

public void CommitAsync()

CommitAsync(Map<TopicPartition, OffsetAndMetadata>, OffsetCommitCallback)

public void CommitAsync(Map<TopicPartition, OffsetAndMetadata> arg0, OffsetCommitCallback arg1)

Parameters

arg0 Map<TopicPartition, OffsetAndMetadata>

Map

arg1 OffsetCommitCallback

OffsetCommitCallback

CommitAsync(OffsetCommitCallback)

public void CommitAsync(OffsetCommitCallback arg0)

Parameters

arg0 OffsetCommitCallback

OffsetCommitCallback

CommitSync()

public void CommitSync()

CommitSync(Duration)

public void CommitSync(Duration arg0)

Parameters

arg0 Duration

Duration

CommitSync(Map<TopicPartition, OffsetAndMetadata>)

public void CommitSync(Map<TopicPartition, OffsetAndMetadata> arg0)

Parameters

arg0 Map<TopicPartition, OffsetAndMetadata>

Map

CommitSync(Map<TopicPartition, OffsetAndMetadata>, Duration)

public void CommitSync(Map<TopicPartition, OffsetAndMetadata> arg0, Duration arg1)

Parameters

arg0 Map<TopicPartition, OffsetAndMetadata>

Map

arg1 Duration

Duration

Committed(Set<TopicPartition>)

public Map<TopicPartition, OffsetAndMetadata> Committed(Set<TopicPartition> arg0)

Parameters

arg0 Set<TopicPartition>

Set

Returns

Map<TopicPartition, OffsetAndMetadata>

Map

Committed(Set<TopicPartition>, Duration)

public Map<TopicPartition, OffsetAndMetadata> Committed(Set<TopicPartition> arg0, Duration arg1)

Parameters

arg0 Set<TopicPartition>

Set

arg1 Duration

Duration

Returns

Map<TopicPartition, OffsetAndMetadata>

Map

CurrentLag(TopicPartition)

public OptionalLong CurrentLag(TopicPartition arg0)

Parameters

arg0 TopicPartition

TopicPartition

Returns

OptionalLong

OptionalLong

DisableTelemetry()

public void DisableTelemetry()

EndOffsets(Collection<TopicPartition>)

public Map<TopicPartition, Long> EndOffsets(Collection<TopicPartition> arg0)

Parameters

arg0 Collection<TopicPartition>

Collection

Returns

Map<TopicPartition, Long>

Map

EndOffsets(Collection<TopicPartition>, Duration)

public Map<TopicPartition, Long> EndOffsets(Collection<TopicPartition> arg0, Duration arg1)

Parameters

arg0 Collection<TopicPartition>

Collection

arg1 Duration

Duration

Returns

Map<TopicPartition, Long>

Map

EnforceRebalance()

public void EnforceRebalance()

EnforceRebalance(String)

public void EnforceRebalance(String arg0)

Parameters

arg0 String

String

GroupMetadata()

public ConsumerGroupMetadata GroupMetadata()

Returns

ConsumerGroupMetadata

ConsumerGroupMetadata

InjectTimeoutException(int)

public void InjectTimeoutException(int arg0)

Parameters

arg0 int

int

LastPollTimeout()

public Duration LastPollTimeout()

Returns

Duration

Duration

ListTopics()

public Map<String, List<PartitionInfo>> ListTopics()

Returns

Map<String, List<PartitionInfo>>

Map

ListTopics(Duration)

public Map<String, List<PartitionInfo>> ListTopics(Duration arg0)

Parameters

arg0 Duration

Duration

Returns

Map<String, List<PartitionInfo>>

Map

Metrics<ReturnExtendsOrg_Apache_Kafka_Common_Metric>()

public Map<MetricName, ReturnExtendsOrg_Apache_Kafka_Common_Metric> Metrics<ReturnExtendsOrg_Apache_Kafka_Common_Metric>() where ReturnExtendsOrg_Apache_Kafka_Common_Metric : Metric

Returns

Map<MetricName, ReturnExtendsOrg_Apache_Kafka_Common_Metric>

Map

Type Parameters

ReturnExtendsOrg_Apache_Kafka_Common_Metric

Metric

OffsetsForTimes(Map<TopicPartition, Long>)

public Map<TopicPartition, OffsetAndTimestamp> OffsetsForTimes(Map<TopicPartition, Long> arg0)

Parameters

arg0 Map<TopicPartition, Long>

Map

Returns

Map<TopicPartition, OffsetAndTimestamp>

Map

OffsetsForTimes(Map<TopicPartition, Long>, Duration)

public Map<TopicPartition, OffsetAndTimestamp> OffsetsForTimes(Map<TopicPartition, Long> arg0, Duration arg1)

Parameters

arg0 Map<TopicPartition, Long>

Map

arg1 Duration

Duration

Returns

Map<TopicPartition, OffsetAndTimestamp>

Map

PartitionsFor(String)

public List<PartitionInfo> PartitionsFor(String arg0)

Parameters

arg0 String

String

Returns

List<PartitionInfo>

List

PartitionsFor(String, Duration)

public List<PartitionInfo> PartitionsFor(String arg0, Duration arg1)

Parameters

arg0 String

String

arg1 Duration

Duration

Returns

List<PartitionInfo>

List

Pause(Collection<TopicPartition>)

public void Pause(Collection<TopicPartition> arg0)

Parameters

arg0 Collection<TopicPartition>

Collection

Paused()

public Set<TopicPartition> Paused()

Returns

Set<TopicPartition>

Set

Poll(Duration)

public ConsumerRecords<K, V> Poll(Duration arg0)

Parameters

arg0 Duration

Duration

Returns

ConsumerRecords<K, V>

ConsumerRecords

Position(TopicPartition)

public long Position(TopicPartition arg0)

Parameters

arg0 TopicPartition

TopicPartition

Returns

long

long

Position(TopicPartition, Duration)

public long Position(TopicPartition arg0, Duration arg1)

Parameters

arg0 TopicPartition

TopicPartition

arg1 Duration

Duration

Returns

long

long

Rebalance(Collection<TopicPartition>)

public void Rebalance(Collection<TopicPartition> arg0)

Parameters

arg0 Collection<TopicPartition>

Collection

ResetShouldRebalance()

public void ResetShouldRebalance()

Resume(Collection<TopicPartition>)

public void Resume(Collection<TopicPartition> arg0)

Parameters

arg0 Collection<TopicPartition>

Collection

ScheduleNopPollTask()

public void ScheduleNopPollTask()

SchedulePollTask(Runnable)

public void SchedulePollTask(Runnable arg0)

Parameters

arg0 Runnable

Runnable

Seek(TopicPartition, OffsetAndMetadata)

public void Seek(TopicPartition arg0, OffsetAndMetadata arg1)

Parameters

arg0 TopicPartition

TopicPartition

arg1 OffsetAndMetadata

OffsetAndMetadata

Seek(TopicPartition, long)

public void Seek(TopicPartition arg0, long arg1)

Parameters

arg0 TopicPartition

TopicPartition

arg1 long

long

SeekToBeginning(Collection<TopicPartition>)

public void SeekToBeginning(Collection<TopicPartition> arg0)

Parameters

arg0 Collection<TopicPartition>

Collection

SeekToEnd(Collection<TopicPartition>)

public void SeekToEnd(Collection<TopicPartition> arg0)

Parameters

arg0 Collection<TopicPartition>

Collection

SetClientInstanceId(Uuid)

public void SetClientInstanceId(Uuid arg0)

Parameters

arg0 Uuid

Uuid

SetOffsetsException(JVMBridgeException)

public void SetOffsetsException(JVMBridgeException arg0)

Parameters

arg0 JVMBridgeException

KafkaException

SetPollException(JVMBridgeException)

public void SetPollException(JVMBridgeException arg0)

Parameters

arg0 JVMBridgeException

KafkaException

ShouldRebalance()

public bool ShouldRebalance()

Returns

bool

bool

Subscribe(Collection<String>)

public void Subscribe(Collection<String> arg0)

Parameters

arg0 Collection<String>

Collection

Subscribe(Collection<String>, ConsumerRebalanceListener)

public void Subscribe(Collection<String> arg0, ConsumerRebalanceListener arg1)

Parameters

arg0 Collection<String>

Collection

arg1 ConsumerRebalanceListener

ConsumerRebalanceListener

Subscribe(Pattern)

public void Subscribe(Pattern arg0)

Parameters

arg0 Pattern

Pattern

Subscribe(Pattern, ConsumerRebalanceListener)

public void Subscribe(Pattern arg0, ConsumerRebalanceListener arg1)

Parameters

arg0 Pattern

Pattern

arg1 ConsumerRebalanceListener

ConsumerRebalanceListener

Subscription()

public Set<String> Subscription()

Returns

Set<String>

Set

Unsubscribe()

public void Unsubscribe()

UpdateBeginningOffsets(Map<TopicPartition, Long>)

public void UpdateBeginningOffsets(Map<TopicPartition, Long> arg0)

Parameters

arg0 Map<TopicPartition, Long>

Map

UpdateEndOffsets(Map<TopicPartition, Long>)

public void UpdateEndOffsets(Map<TopicPartition, Long> arg0)

Parameters

arg0 Map<TopicPartition, Long>

Map

UpdatePartitions(String, List<PartitionInfo>)

public void UpdatePartitions(String arg0, List<PartitionInfo> arg1)

Parameters

arg0 String

String

arg1 List<PartitionInfo>

List

Wakeup()

public void Wakeup()

Operators

implicit operator MockConsumer(MockConsumer<K, V>)

Converter from MockConsumer<K, V> to MockConsumer

public static implicit operator MockConsumer(MockConsumer<K, V> t)

Parameters

t MockConsumer<K, V>

Returns

MockConsumer