pubsub

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBufferedPublisherWithRetryFactory

func NewBufferedPublisherWithRetryFactory(
	ctx context.Context,
	projectID string,
	batchSize int32,
	flushDelayThresholdMillis int32,
	maxRetryCount int16,
	initialRetryIntervalMillis int32,
	opts ...option.ClientOption) (publisher2.BufferedPublisherWithRetry, error)

NewBufferedPublisherWithRetryFactory - factory that create a cloud_pubsub client and then initialize a publisher.BufferedPublisherWithRetry.

func NewPubSubBufferedPublisherFactory

func NewPubSubBufferedPublisherFactory(
	ctx context.Context,
	projectID string,
	batchSize int32,
	flushDelayThreshold int32,
	opts ...option.ClientOption) (publisher2.BufferedPublisher, error)

NewPubSubBufferedPublisherFactory - factory that create a cloud_pubsub client and then initialize a publisher.BufferedPublisher.

Types

type Message

type Message struct {
	// MessageId - Pubsub message id
	MessageId string
	// data - Pubsub message payload
	Data []byte
	// Attributes - Pubsub topic Attributes
	Attributes map[string]string
}

Message - Message GetPayload model implementing Message interface.

func NewPubSubMessage

func NewPubSubMessage(messageId string, payloadBody []byte, payloadAttrs map[string]string) *Message

NewPubSubMessage creates a new PubSub Message.

func (*Message) GetMessageAttributes added in v0.3.0

func (msg *Message) GetMessageAttributes() map[string]string

GetMessageAttributes - Get Message Attributes

func (*Message) GetMsgRefId

func (msg *Message) GetMsgRefId() string

GetMsgRefId - Get message id

func (*Message) GetPayload

func (msg *Message) GetPayload() []byte

GetPayload - Get message payload

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL