Defines methods for a mock kafka consumer: allows for publishing test messages and provides a MkConsumer instance
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Abstract methods
Publish a message to the topic.
Publish a message to the topic.
Semantically blocking until a consumer subscribes to the topic: internally, it's polling for assignments, as the native kafka mock doesn't support upfront publication but requires an assignment to be made before publishing.
Type parameters
- K
-
the key type
- V
-
the value type
Value parameters
- key
-
the key to publish
- keySerializer
-
the key serializer
- timestamp
-
optional timestamp of the message
- topic
-
the topic to publish to
- value
-
the value to publish
- valueSerializer
-
the value serializer
Attributes
- Returns
-
once published, a unit
Redact a message from the topic, aka. publish a tombstone.
Redact a message from the topic, aka. publish a tombstone.
Type parameters
- K
-
the key type
Value parameters
- key
-
the key to redact
- keySerializer
-
the key serializer
- topic
-
the topic to redact from
Attributes
- Returns
-
once redacted, a unit
Implicits
Implicits
MkConsumer instance providing the mock consumer. Including this instance in implicit scope where the kafka consumer resource is created will feed it with the mock consumer instance instead of the default, real one.
MkConsumer instance providing the mock consumer. Including this instance in implicit scope where the kafka consumer resource is created will feed it with the mock consumer instance instead of the default, real one.