func (pub *Publication) StreamID() int32 {
	return pub.streamID
}
StreamID returns Stream identity for scoping within the channel media address.
package aeron
import (
	"fmt"
	"github.com/lirm/aeron-go/aeron/atomic"
	"github.com/lirm/aeron-go/aeron/logbuffer"
	"github.com/lirm/aeron-go/aeron/logbuffer/term"
	"github.com/lirm/aeron-go/aeron/util"
	logging "github.com/op/go-logging"
)
const (
	NotConnected int64 = -1
	BackPressured int64 = -2
	AdminAction int64 = -3
	PublicationClosed int64 = -4
	MaxPositionExceeded int64 = -5
)
type Publication struct {
	conductor                *ClientConductor
	channel                  string
	regID                    int64
	originalRegID            int64
	maxPossiblePosition      int64
	streamID                 int32
	sessionID                int32
	initialTermID            int32
	maxPayloadLength         int32
	maxMessageLength         int32
	positionBitsToShift      int32
	pubLimit                 Position
	channelStatusIndicatorID int32
	isClosed atomic.Bool
	metaData *logbuffer.LogBufferMetaData
	appenders [logbuffer.PartitionCount]*term.Appender
}
func NewPublication(logBuffers *logbuffer.LogBuffers) *Publication {
	termBufferCapacity := logBuffers.Buffer(0).Capacity()
	pub := new(Publication)
	pub.metaData = logBuffers.Meta()
	pub.initialTermID = pub.metaData.InitTermID.Get()
	pub.maxPayloadLength = pub.metaData.MTULen.Get() - logbuffer.DataFrameHeader.Length
	pub.maxMessageLength = logbuffer.ComputeMaxMessageLength(termBufferCapacity)
	pub.positionBitsToShift = int32(util.NumberOfTrailingZeroes(uint32(termBufferCapacity)))
	pub.maxPossiblePosition = int64(termBufferCapacity) * (1 << 31)
	pub.isClosed.Set(false)
	for i := 0; i < logbuffer.PartitionCount; i++ {
		appender := term.MakeAppender(logBuffers, i)
		logger.Debugf("TermAppender[%d]: %v", i, appender)
		pub.appenders[i] = appender
	}
	return pub
}
func (pub *Publication) ChannelStatusID() int32 {
	return pub.channelStatusIndicatorID
}
func (pub *Publication) RegistrationID() int64 {
	return pub.regID
}
func (pub *Publication) OriginalRegistrationID() int64 {
	return pub.originalRegID
}
func (pub *Publication) Channel() string {
	return pub.channel
}