func New(parentActDesc *actor.Descriptor, spawnInFn SpawnInFn) *T {
	return &T{
		actDesc:   parentActDesc.NewChild("mux"),
		inputs:    make(map[int32]*input),
		spawnInFn: spawnInFn,
		stopCh:    make(chan none.T),
	}
}
New creates a new multiplexer instance.
package multiplexer
import (
	"reflect"
	"sort"
	"sync"
	"time"
	"github.com/mailgun/kafka-pixy/actor"
	"github.com/mailgun/kafka-pixy/consumer"
	"github.com/mailgun/kafka-pixy/none"
)
type T struct {
	actDesc   *actor.Descriptor
	spawnInFn SpawnInFn
	inputs    map[int32]*input
	output    Out
	isRunning bool
	stopCh    chan none.T
	wg        sync.WaitGroup
	sortedInsMu sync.Mutex
	sortedIns   []*input
}
type In interface {
	Messages() <-chan consumer.Message
	IsSafe2Stop() bool
	Stop()
}
type Out interface {
	Messages() chan<- consumer.Message
}
type SpawnInFn func(partition int32) In