Documentation ¶
Index ¶
- func CloseConsumer()
- func CloseProducer()
- func Dequeue[T any](ctx context.Context, count int) ([]T, error)
- func Enqueue[T any](ctx context.Context, items ...T) (bool, error)
- func Initialize(config Config) error
- func IsInitialized() bool
- func LastEnqueueSucceeded() bool
- func Subscribe(topic string, consumer sarama.Consumer, fetchCount int, ...) error
- type Config
- type QueueConsumer
- type QueueProducer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LastEnqueueSucceeded ¶
func LastEnqueueSucceeded() bool
Returns true if it is known that last Enqueue to Kafka succeeded or not.
Types ¶
type Config ¶
Config contains the global config for this kafka package.
type QueueConsumer ¶
type QueueConsumer struct {
// contains filtered or unexported fields
}
func GetConsumer ¶
func GetConsumer(config *sarama.Config) (*QueueConsumer, error)
Returns the singleton instance consumer.
type QueueProducer ¶
type QueueProducer struct {
// contains filtered or unexported fields
}
QueueProducer struct contains the sarama producer instance & other necessary artifacts required to achieve our producer functionalities, e.g. - error tracking, successful send sampling...
func GetProducer ¶
func GetProducer(config *sarama.Config) (*QueueProducer, error)
GetProducer will return the singleton instance of the producer.
Click to show internal directories.
Click to hide internal directories.