# message-queue-go-producer **Repository Path**: mirrors_Financial-Times/message-queue-go-producer ## Basic Information - **Project Name**: message-queue-go-producer - **Description**: Kafka Proxy go producer library - responsible for writing messages to kafka, through the kafka proxy. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2025-10-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Kafka Proxy producer library [![GoDoc](https://godoc.org/github.com/Financial-Times/message-queue-go-producer/producer?status.svg)](https://godoc.org/github.com/Financial-Times/message-queue-go-producer/producer) [![Circle CI](https://circleci.com/gh/Financial-Times/message-queue-go-producer.svg?style=shield)](https://circleci.com/gh/Financial-Times/message-queue-go-producer/tree/master) [![Go Report Card](https://goreportcard.com/badge/github.com/Financial-Times/message-queue-go-producer)](https://goreportcard.com/report/github.com/Financial-Times/message-queue-go-producer) [![Coverage Status](https://coveralls.io/repos/github/Financial-Times/message-queue-go-producer/badge.svg)](https://coveralls.io/github/Financial-Times/message-queue-go-producer) Responsible for writing messages to kafka, through the kafka proxy Go implementation of https://github.com/Financial-Times/message-queue-producer library ### Usage `go get github.com/Financial-Times/message-queue-go-producer/producer` `import github.com/Financial-Times/message-queue-go-producer/producer` The Api allows two ways of writing in kafka: * SendMessage(msg Message) - accepts a Message having a map of headers and a message body, converts it to a standard FT raw message (string representation), and stores it in Kafka * SendRawMessage(msg string) - capable of storing plain string messages Creating a producer is based on a producer configuration. The client should create a producer instance, based on config settings. ```go conf := queueProducer.MessageProducerConfig{ Addr: "", Topic: "", Queue: "", Authorization: "", } producerInstance = queueProducer.NewMessageProducer(producerConfig) producerInstance.SendMessage(uuid, queueProducer.Message{Headers: msg.Headers, Body: msg.Body}) ``` ### Build `go build ./producer` `go test ./producer`