From dad2a26611698f7a710f2d8b5d901019c652d29d Mon Sep 17 00:00:00 2001 From: Rogee Date: Thu, 11 Sep 2025 14:10:38 +0800 Subject: [PATCH] feat: update EventHandler and EventPublisher interfaces to include Channel and PublishTo methods --- contracts/events.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) }