Switch to broker.Event
This commit is contained in:
parent
39649b39ef
commit
3d62ef5819
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user