messaging

package
v0.0.0-...-b77cb3b Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CreateProducer(topic string) (Producer, error)
	CreateConsumer(topic string, subscriptionName string) (Consumer, error)
	Close()
}

Client : A client that can create producers and consumers

func NewPulsarClient

func NewPulsarClient(pulsarURL string) (Client, error)

NewPulsarClient : Create a new Pulsar client

type Consumer

type Consumer interface {
	Receive() ([]byte, error)
	Close()
}

Consumer : A message consumer that can receive messages from a specified topic

type Producer

type Producer interface {
	Send(payload []byte) error
	Close()
}

Producer : A message producer that can send messages to a specified topic

type PulsarClient

type PulsarClient struct {
	// contains filtered or unexported fields
}

PulsarClient : A client for creating Pulsar producers and consumers

func (*PulsarClient) Close

func (client *PulsarClient) Close()

Close : Close the Pulsar client

func (*PulsarClient) CreateConsumer

func (client *PulsarClient) CreateConsumer(topic string, subscriptionName string) (Consumer, error)

CreateConsumer : Create a new Pulsar consumer

func (*PulsarClient) CreateProducer

func (client *PulsarClient) CreateProducer(topic string) (Producer, error)

CreateProducer : Create a new Pulsar producer

type PulsarConsumer

type PulsarConsumer struct {
	// contains filtered or unexported fields
}

PulsarConsumer : A consumer for receiving messages from an Apache Pulsar topic

func (*PulsarConsumer) Close

func (consumer *PulsarConsumer) Close()

Close : Close the Pulsar consumer

func (*PulsarConsumer) Receive

func (consumer *PulsarConsumer) Receive() ([]byte, error)

Receive : Receive a message through the Pulsar consumer

type PulsarProducer

type PulsarProducer struct {
	// contains filtered or unexported fields
}

PulsarProducer : A producer for sending messages to an Apache Pulsar topic

func (*PulsarProducer) Close

func (producer *PulsarProducer) Close()

Close : Close the Pulsar producer

func (*PulsarProducer) Send

func (producer *PulsarProducer) Send(payload []byte) error

Send : Send a message payload through the Pulsar producer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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