func (msg *Message) GetOrigRouter() Router {
	return StreamRegistry.GetRouterOrFallback(msg.GetOrigStreamID())
}
GetOrigRouter returns the stream object behind the original StreamID.
package core
import (
	"bytes"
	"encoding/gob"
	"time"
	"github.com/trivago/tgo/tcontainer"
	"github.com/golang/protobuf/proto"
)
type MessageData struct {
	payload  []byte
	metadata tcontainer.MarshalMap
}
type Message struct {
	data         MessageData
	orig         *MessageData
	streamID     MessageStreamID
	prevStreamID MessageStreamID
	origStreamID MessageStreamID
	source       MessageSource
	timestamp    int64
}
func NewMessage(source MessageSource, data []byte, metadata tcontainer.MarshalMap, streamID MessageStreamID) *Message {
	msg := &Message{
		source:       source,
		streamID:     streamID,
		origStreamID: streamID,
		timestamp:    time.Now().UnixNano(),
	}
	msg.data.payload = getPayloadCopy(data)
	if metadata != nil && len(metadata) > 0 {
		msg.data.metadata = metadata
	}
	return msg
}
func getPayloadCopy(data []byte) (buffer []byte) {
	buffer = make([]byte, len(data))
	copy(buffer, data)
	return
}
func (msg *Message) GetCreationTime() time.Time {
	return time.Unix(0, msg.timestamp)
}
func (msg *Message) GetStreamID() MessageStreamID {
	return msg.streamID
}
func (msg *Message) GetOrigStreamID() MessageStreamID {
	return msg.origStreamID
}
func (msg *Message) GetPrevStreamID() MessageStreamID {
	return msg.prevStreamID
}
func (msg *Message) GetRouter() Router {
	return StreamRegistry.GetRouterOrFallback(msg.GetStreamID())
}
func (msg *Message) GetPrevRouter() Router {
	return StreamRegistry.GetRouterOrFallback(msg.GetPrevStreamID())
}