diff --git a/event.go b/event.go index f4eeb21..b205e88 100644 --- a/event.go +++ b/event.go @@ -127,6 +127,9 @@ type Event interface { // GetOffset returns the offset of the event GetOffset() int + + // GetTopic returns the topic of the event + GetTopic() string } // AbstractEvent provides a base implementation of an event @@ -291,3 +294,8 @@ func (ae *AbstractEvent) GetLastInBatch() bool { func (ae *AbstractEvent) GetOffset() int { return 0 } + +// GetTopic returns the topic of the event +func (ae *AbstractEvent) GetTopic() string { + return "" +}