From 5cedaef171bcb4f9219319f43d6852f8f8cb682b Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Sun, 7 Jul 2019 12:44:09 +0100 Subject: [PATCH] Change Publication to Event --- subscriber.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subscriber.go b/subscriber.go index 7a9f19a..97b9d75 100644 --- a/subscriber.go +++ b/subscriber.go @@ -167,7 +167,7 @@ func validateSubscriber(sub server.Subscriber) error { } func (g *grpcServer) createSubHandler(sb *subscriber, opts server.Options) broker.Handler { - return func(p broker.Publication) error { + return func(p broker.Event) error { msg := p.Message() ct := msg.Header["Content-Type"] if len(ct) == 0 { @@ -208,7 +208,7 @@ func (g *grpcServer) createSubHandler(sb *subscriber, opts server.Options) broke co := cf(b) defer co.Close() - if err := co.ReadHeader(&codec.Message{}, codec.Publication); err != nil { + if err := co.ReadHeader(&codec.Message{}, codec.Event); err != nil { return err }