{"id":74536,"library":"onsdigital-dp-kafka","title":"DP Kafka","description":"A Go library for producing and consuming Kafka messages, part of the ONS Digital Publishing platform.","status":"active","version":"1.1.7","language":"go","source_language":null,"source_url":"https://github.com/ONSdigital/dp-kafka","tags":["kafka","messaging","ons","publishing"],"install":[{"cmd":"go get github.com/ONSdigital/dp-kafka","lang":"bash","label":"Install github.com/ONSdigital/dp-kafka"}],"dependencies":[],"imports":[{"symbol":"kafka","correct":"github.com/ONSdigital/dp-kafka"}],"quickstart":{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"github.com/ONSdigital/dp-kafka\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tproducer, err := kafka.NewProducer(ctx, []string{\"localhost:9092\"}, \"my-topic\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer producer.Close(ctx)\n\tproducer.Send(ctx, []byte(\"hello\"))\n}","lang":"go","description":"Creates a Kafka producer and sends a message."},"warnings":[],"env_vars":null,"search_vec":"'consum':9 'digit':16 'dp':1 'go':4 'kafka':2,10,19 'librari':5 'messag':11,20 'on':15,21 'part':12 'platform':18 'produc':7 'publish':17,22","created_at":"2026-06-17T19:04:54.345032+00:00","updated_at":"2026-06-17T19:04:54.345032+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#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}}