wpc

package module
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func New

func New(connectionUrl string, logger *zap.SugaredLogger, pulsarOptions ...*pulsar.ClientOptions) *wpc

func NewWpcSubscriber

func NewWpcSubscriber(h MessageHandler) *wpcSubscriber

func Pd

func Pd(topic string) pulsar.Producer

func ReleaseMessage

func ReleaseMessage(msg *Message)

Types

type Message

type Message struct {
	MessageId       []byte
	Topic           string
	ProducerName    string
	Properties      map[string]string
	Payload         []byte
	PublishTime     time.Time
	EventTime       time.Time
	RedeliveryCount int
}

func AcquireMessage

func AcquireMessage() *Message

func (*Message) ReleaseThis

func (m *Message) ReleaseThis()

type MessageHandler

type MessageHandler func(msg *Message) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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