{"modulePath":"github.com/infinitbyte/framework","version":"v1.1.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package kafka_queue\n\n## Constants\n\n```go\nconst SCRAM_SHA_256_Mechanism = \"SCRAM-SHA-256\"\n```\nconst PLAIN\\_MECHANISM = \"PLAIN\"//\n\n```go\nconst SCRAM_SHA_512_Mechanism = \"SCRAM-SHA-512\"\n```\n\n## Types\n\n```go\ntype Config struct {\n\tEnabled               bool   `config:\"enabled\"`\n\tDefault               bool   `config:\"default\"`\n\tCompression           bool   `config:\"compression\"`\n\tNumOfPartition        int    `config:\"num_of_partition\"`\n\tNumOfReplica          int    `config:\"num_of_replica\"`\n\tPrefix                string `config:\"prefix\"`\n\tProducerBatchMaxBytes int32  `config:\"producer_batch_max_bytes\"`\n\tMaxBufferedRecords    int    `config:\"max_buffered_records\"`\n\tManualFlushing        bool   `config:\"manual_flushing\"`\n\n\tBrokers  []string `config:\"brokers\"`\n\tUsername string   `config:\"username\"`\n\tPassword string   `config:\"password\"`\n\tTLS      bool     `config:\"tls\"`\n\n\tMechanism string `config:\"mechanism\"`\n}\n```\n\n```go\ntype Consumer struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (this *Consumer) Close() error\n```\n\n```go\nfunc (this *Consumer) CommitOffset(off queue.Offset) error\n```\n\n```go\nfunc (this *Consumer) FetchMessages(ctx *queue.Context, numOfMessages int) (messages []queue.Message, isTimeout bool, err error)\n```\n\n```go\nfunc (this *Consumer) ResetOffset(part, readPos int64) (err error)\n```\n\n```go\ntype KafkaQueue struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (this *KafkaQueue) AcquireConsumer(qconfig *queue.QueueConfig, consumer *queue.ConsumerConfig) (queue.ConsumerAPI, error)\n```\n\n```go\nfunc (this *KafkaQueue) AcquireProducer(cfg *queue.QueueConfig) (queue.ProducerAPI, error)\n```\n\n```go\nfunc (this *KafkaQueue) Close(string) error\n```\n\n```go\nfunc (this *KafkaQueue) CommitOffset(k *queue.QueueConfig, consumer *queue.ConsumerConfig, offset queue.Offset) (bool, error)\n```\n\n```go\nfunc (this *KafkaQueue) DeleteOffset(k *queue.QueueConfig, consumer *queue.ConsumerConfig) error\n```\n\n```go\nfunc (this *KafkaQueue) Depth(q string) int64\n```\n\n```go\nfunc (this *KafkaQueue) Destroy(k string) error\n```\n\n```go\nfunc (this *KafkaQueue) GetOffset(k *queue.QueueConfig, consumer *queue.ConsumerConfig) (queue.Offset, error)\n```\n\n```go\nfunc (this *KafkaQueue) GetQueues() []string\n```\n\n```go\nfunc (this *KafkaQueue) GetStorageSize(k string) uint64\n```\n\n```go\nfunc (this *KafkaQueue) Init(q string) error\n```\n\n```go\nfunc (this *KafkaQueue) LatestOffset(k *queue.QueueConfig) queue.Offset\n```\n\n```go\nfunc (this *KafkaQueue) Name() string\n```\n\n```go\nfunc (this *KafkaQueue) Pop(q string, t time.Duration) (data []byte, timeout bool)\n```\n\n```go\nfunc (this *KafkaQueue) Push(q string, data []byte) error\n```\n\n```go\nfunc (this *KafkaQueue) ReleaseConsumer(qconfig *queue.QueueConfig, consumer *queue.ConsumerConfig, instance queue.ConsumerAPI) error\n```\n\n```go\nfunc (this *KafkaQueue) ReleaseProducer(k *queue.QueueConfig, producer queue.ProducerAPI) error\n```\n\n```go\nfunc (this *KafkaQueue) Setup()\n```\n\n```go\nfunc (this *KafkaQueue) Start() error\n```\n\n```go\nfunc (this *KafkaQueue) Stop() error\n```\n\n```go\ntype Producer struct {\n\tID string\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (p *Producer) Close() error\n```\n\n```go\nfunc (p *Producer) Produce(reqs *[]queue.ProduceRequest) (*[]queue.ProduceResponse, error)\n```\n\n","path":"github.com/infinitbyte/framework/plugins/queue/kafka_queue","name":"kafka_queue","synopsis":"","isRedistributable":true}
