consumer

package
v0.0.0-...-ed33083 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const BROKER_URL = "http://localhost:3000"

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	Offset    int
	Topic     string
	Partition int
	// contains filtered or unexported fields
}

Consumers will contains their own offset that will tell them till wher they have already fetched the messages

func NewConsumer

func NewConsumer(conig ConsumerConfig) *Consumer

NewConsumer will create a new consumer

func (*Consumer) ReadMessage

func (c *Consumer) ReadMessage(interval time.Duration) (api.Message, error)

func (*Consumer) SubscribeToTopic

func (c *Consumer) SubscribeToTopic(topic string, Partition int)

type ConsumerConfig

type ConsumerConfig struct {
}

Jump to

Keyboard shortcuts

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