package model import ( "fmt" ) type SourceID struct { Topic string Partition int32 Offset int64 } type Message struct { ID SourceID Headers map[string]string Payload []byte } func (id *SourceID) String() string { return fmt.Sprintf("%v[%d]@%v", id.Topic, id.Partition, id.Offset) }