Switch to broker.Event

This commit is contained in:
Asim Aslam 2019-07-07 12:46:31 +01:00 committed by Vasiliy Tolstov
parent 39649b39ef
commit 3d62ef5819

View File

@ -183,7 +183,7 @@ func validateSubscriber(sub server.Subscriber) error {
}
func (s *httpServer) createSubHandler(sb *httpSubscriber, 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"]
cf, err := s.newCodec(ct)
@ -220,7 +220,7 @@ func (s *httpServer) createSubHandler(sb *httpSubscriber, opts server.Options) b
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
}