messaging

package
v0.0.0-...-f895429 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CpKafkaClient

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

CpKafkaClient struct

func NewCpKafkaClient

func NewCpKafkaClient(config *CpKafkaConfig) *CpKafkaClient

NewCpKafkaClient creates instance

func (*CpKafkaClient) Consume

func (client *CpKafkaClient) Consume(topic string, groupID string, handler func(msg *Msg) error) error

Consume message

func (*CpKafkaClient) IsLocalConsume

func (client *CpKafkaClient) IsLocalConsume(topic string, key string) (bool, error)

IsLocalConsume check if a key is assigned to local consumer

func (*CpKafkaClient) Publish

func (client *CpKafkaClient) Publish(msg *Msg) error

Publish message

func (*CpKafkaClient) Shutdown

func (client *CpKafkaClient) Shutdown()

Shutdown all subscriptions

type CpKafkaConfig

type CpKafkaConfig struct {
	Brokers string
}

CpKafkaConfig struct

type Msg

type Msg struct {
	Topic string
	Key   string
	Value []byte
	Reply string
	ID    string
}

Msg struct

Jump to

Keyboard shortcuts

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