Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { Topic string ConsumerID uint64 Msg *api.CommandMessage Meta *api.MessageMetadata Payload []byte }
Message represents a received MESSAGE from the Pulsar server.
type SingleMessage ¶
type SingleMessage struct { SingleMetaSize uint32 SingleMeta *api.SingleMessageMetadata SinglePayload []byte }
SingleMessage represents one of the elements of the batch type payload
func DecodeBatchMessage ¶
func DecodeBatchMessage(msg *Message) ([]*SingleMessage, error)
DecodeBatchMessage decode message if num_messages_in_batch exist and bigger than 0
func DecodeBatchPayload ¶
func DecodeBatchPayload(bp []byte, batchNum int32) ([]*SingleMessage, error)
DecodeBatchPayload parses the payload of the batch type If the producer uses the batch function, msg.Payload will be a SingleMessage array structure.
Click to show internal directories.
Click to hide internal directories.