Categorygithub.com/tarent/kafkaadmin
modulepackage
0.5.0
Repository: https://github.com/tarent/kafkaadmin.git
Documentation: pkg.go.dev

# README

KafkaAdmin Library

Is used to ensure that a topic exists. It's API doesn't support configuration of the topics to avoid conflicts between different services using the same topic. Each service, should call this lib on booting. It doesn't matter whether it reads or writes to the topic.

Every topic created has the cleanup.policy compact, a replication of 3 and 32 partitions, as this is a sane default for our platform.

Usage

In code you can use it like this:

err := kafkaadmin.EnsureCompactedTopicExists(ctx, kafkaURL, tlsConfig, topicName)
if err != nil {
	return fmt.Errorf("ensuring topic %q failed: %w", topicName, err)
}

Made with ♥ by Team Hasselhoff

# Functions

No description provided by the author
EnsureCompactedTopicExists checks if the topic with the given name is missing if it doesn't exist, it creates it with the default configuration The configuration can't be altered currently, because we want to avoid conflicts by different services creating the same topic.
EnsureTopicExistsWithCleanupPolicyDelete checks if the topic with the given name is missing if it doesn't exist, it creates it with the default configuration The configuration can't be altered currently, because we want to avoid conflicts by different services creating the same topic.
No description provided by the author
No description provided by the author