{"id":69761,"library":"onsdigital-dp-kafka-v2","title":"ONSdigital/dp-kafka","description":"A Go library for interacting with Apache Kafka, used by the Office for National Statistics.","status":"active","version":"2.8.0","language":"go","source_language":null,"source_url":"https://github.com/ONSdigital/dp-kafka","tags":["kafka","messaging","streaming"],"install":[{"cmd":"go get github.com/ONSdigital/dp-kafka/v2","lang":"bash","label":"Install github.com/ONSdigital/dp-kafka/v2"}],"dependencies":[],"imports":[{"symbol":"kafka","correct":"github.com/ONSdigital/dp-kafka/v2"}],"quickstart":{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"github.com/ONSdigital/dp-kafka/v2\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tconfig := &kafka.Config{BrokerAddrs: []string{\"localhost:9092\"}}\n\tproducer, err := kafka.NewProducer(ctx, config)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer producer.Close(ctx)\n\tproducer.Send(ctx, \"topic\", []byte(\"message\"))\n}","lang":"go","description":"Create a Kafka producer and send a message."},"warnings":[],"env_vars":null,"search_vec":"'apach':8 'go':3 'interact':6 'kafka':9,17 'librari':4 'messag':18 'nation':15 'offic':13 'onsdigital/dp-kafka':1 'statist':16 'stream':19 'use':10","created_at":"2026-06-17T18:05:34.238248+00:00","updated_at":"2026-06-17T18:05:34.238248+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/ONSdigital/dp-kafka","github":"https://github.com/ONSdigital/dp-kafka","docs":"https://pkg.go.dev/github.com/ONSdigital/dp-kafka/v2#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}}