diff --git a/contracts/events.go b/contracts/events.go index 60776b4..88cf32a 100644 --- a/contracts/events.go +++ b/contracts/events.go @@ -4,11 +4,15 @@ import "github.com/ThreeDotsLabs/watermill/message" type EventHandler interface { Topic() string - PublishToTopic() string + Channel() Channel + PublishTo() (Channel, string) Handler(msg *message.Message) ([]*message.Message, error) } +type Channel string + type EventPublisher interface { Topic() string + Channel() Channel Marshal() ([]byte, error) }