func DefaultUnmarshalMessageFunc(topic string, req *http.Request) (*message.Message, error) {
	body, err := ioutil.ReadAll(req.Body)
	if err != nil {
		return nil, err
	}
	uuid := req.Header.Get(HeaderUUID)
	msg := message.NewMessage(uuid, body)
	metadata := req.Header.Get(HeaderMetadata)
	if metadata != "" {
		err = json.Unmarshal([]byte(metadata), &msg.Metadata)
		if err != nil {
			return nil, errors.Wrap(err, "could not unmarshal metadata from request")
		}
	}
	return msg, nil
}
DefaultUnmarshalMessageFunc retrieves the UUID and Metadata from request headers,
as encoded by DefaultMarshalMessageFunc.
package http
import (
	"context"
	"encoding/json"
	"io/ioutil"
	"net"
	"net/http"
	"strings"
	"sync"
	"github.com/go-chi/chi"
	"github.com/pkg/errors"
	"github.com/ThreeDotsLabs/watermill"
	"github.com/ThreeDotsLabs/watermill/message"
)
type UnmarshalMessageFunc func(topic string, request *http.Request) (*message.Message, error)