{"id":69521,"library":"shopify-sarama-v1","title":"Sarama","description":"A pure Go client library for Apache Kafka, providing both high-level and low-level APIs for producing and consuming messages.","status":"active","version":"1.20.1","language":"go","source_language":null,"source_url":"https://github.com/Shopify/sarama","tags":["kafka","messaging","producer","consumer","sarama"],"install":[{"cmd":"go get gopkg.in/Shopify/sarama.v1","lang":"bash","label":"Install gopkg.in/Shopify/sarama.v1"}],"dependencies":[],"imports":[{"symbol":"sarama","correct":"gopkg.in/Shopify/sarama.v1"}],"quickstart":{"code":"package main\n\nimport (\n\t\"fmt\"\n\t\"gopkg.in/Shopify/sarama.v1\"\n)\n\nfunc main() {\n\tconfig := sarama.NewConfig()\n\tproducer, err := sarama.NewSyncProducer([]string{\"localhost:9092\"}, config)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer producer.Close()\n\tmsg := &sarama.ProducerMessage{Topic: \"test\", Value: sarama.StringEncoder(\"hello\")}\n\tpartition, offset, err := producer.SendMessage(msg)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Printf(\"Message sent to partition %d at offset %d\\n\", partition, offset)\n}","lang":"go","description":"Sends a message to a Kafka topic using the synchronous producer."},"warnings":[{"fix":"Use github.com/bsm/sarama-cluster for consumer group support.","message":"Consumer group rebalancing is not supported; use external libraries like sarama-cluster for that.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'apach':8 'api':19 'client':5 'consum':23,28 'go':4 'high':13 'high-level':12 'kafka':9,25 'level':14,18 'librari':6 'low':17 'low-level':16 'messag':24,26 'produc':21,27 'provid':10 'pure':3 'sarama':1,29","created_at":"2026-06-17T18:02:52.896121+00:00","updated_at":"2026-06-17T18:02:52.896121+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/Shopify/sarama","github":"https://github.com/Shopify/sarama","docs":"https://pkg.go.dev/gopkg.in/Shopify/sarama.v1#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}