func newMessage(shard uint32, buffer *common.RefCountedBuffer) producer.Message {
	return message{shard: shard, buffer: buffer}
}
TODO(cw): Pool the messages if needed.
package router
import (
	"github.com/m3db/m3aggregator/aggregator/handler/common"
	"github.com/m3db/m3msg/producer"
)
type withAckRouter struct {
	p producer.Producer
}
func NewWithAckRouter(p producer.Producer) Router {
	return withAckRouter{p: p}
}
func (r withAckRouter) Route(shard uint32, buffer *common.RefCountedBuffer) error {
	return r.p.Produce(newMessage(shard, buffer))
}
func (r withAckRouter) Close() {
	r.p.Close(producer.WaitForConsumption)
}
type message struct {
	shard  uint32
	buffer *common.RefCountedBuffer
}