Package de.otto.synapse.compaction.s3
Class SnapshotMessageConsumer
java.lang.Object
de.otto.synapse.compaction.s3.SnapshotMessageConsumer
- All Implemented Interfaces:
de.otto.synapse.consumer.MessageConsumer<String>,Consumer<de.otto.synapse.message.Message<String>>
public class SnapshotMessageConsumer
extends Object
implements de.otto.synapse.consumer.MessageConsumer<String>
A
MessageConsumer that is used to update Snapshots.-
Constructor Summary
ConstructorsConstructorDescriptionSnapshotMessageConsumer(de.otto.synapse.translator.MessageFormat messageFormat, de.otto.synapse.state.StateRepository<String> stateRepository) Creates a StatefulMessageConsumer. -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns the pattern ofmessage keysaccepted by this consumer.Returns the expected payload type ofeventsconsumed by this EventConsumer.
-
Constructor Details
-
SnapshotMessageConsumer
public SnapshotMessageConsumer(de.otto.synapse.translator.MessageFormat messageFormat, de.otto.synapse.state.StateRepository<String> stateRepository) Creates a StatefulMessageConsumer.The message's
Key.partitionKey()is used as the key for repository entries.- Parameters:
messageFormat- the format used to write messages into the snapshotstateRepository- the StateRepository that is holding the State
-
-
Method Details
-
payloadType
Returns the expected payload type ofeventsconsumed by this EventConsumer.- Specified by:
payloadTypein interfacede.otto.synapse.consumer.MessageConsumer<String>- Returns:
- payload type
-
keyPattern
Returns the pattern ofmessage keysaccepted by this consumer.- Specified by:
keyPatternin interfacede.otto.synapse.consumer.MessageConsumer<String>- Returns:
- Pattern
-
accept
-