{"id":21513117,"url":"https://github.com/turnerlabs/kplserver","last_synced_at":"2025-06-26T01:36:56.309Z","repository":{"id":42062652,"uuid":"265667352","full_name":"turnerlabs/kplserver","owner":"turnerlabs","description":"Exposes the Amazon Kinesis Producer Library via sockets for multi-language support","archived":false,"fork":false,"pushed_at":"2022-04-14T16:05:21.000Z","size":100,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T19:00:52.393Z","etag":null,"topics":["aws","bigdata","kinesis","kpl"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/turnerlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-20T19:27:32.000Z","updated_at":"2023-08-28T20:39:24.000Z","dependencies_parsed_at":"2022-08-12T03:50:16.840Z","dependency_job_id":null,"html_url":"https://github.com/turnerlabs/kplserver","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/turnerlabs/kplserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnerlabs%2Fkplserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnerlabs%2Fkplserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnerlabs%2Fkplserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnerlabs%2Fkplserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/turnerlabs","download_url":"https://codeload.github.com/turnerlabs/kplserver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnerlabs%2Fkplserver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261983560,"owners_count":23240218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","bigdata","kinesis","kpl"],"created_at":"2024-11-23T22:54:09.005Z","updated_at":"2025-06-26T01:36:56.285Z","avatar_url":"https://github.com/turnerlabs.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kplserver\n\nExposes the [Amazon Kinesis Producer Library](https://github.com/awslabs/amazon-kinesis-producer) via sockets for\nmulti-language support.\n\n[![Docker Repository on Quay](https://quay.io/repository/turner/kplserver/status \"Docker Repository on Quay\")](https://quay.io/repository/turner/kplserver)\n\nThe KPL is written in Java and designed to be consumed by Java applications. This project may be useful if you're\nbuilding a data ingestion app using Kinesis in a language other than Java.\n\n### Usage\n\n- Point the server to your kinesis stream by setting the `AWS_DEFAULT_REGION` and `KINESIS_STREAM` environment variables. Once the server is\nup and running, you can send data to Kinesis by opening a socket connection and sending utf-8 data.\n- Each record you send should be delimited by a new line.\n- If you don't pass in a hash key a random hash key is generated for you.\n  - To pass in a hash key, add the hash key as kdshashkey on the root of your JSON object.\n\nWhen service starts, it exposes two ports:\n1. Inlet Port: This port is used to receive the message from your app to be sent to kinesis. The server defaults to port `3000` but can be overridden by setting the `PORT` environment variable.\n2. Outlet Port: This port is used to send any message back to your app in case kplserver is not able to send message to kinesis after all retries. This port default to `3001` but can be overwritten by environment variable `ERROR_SOCKET_PORT`. Messages are not persisted if your app is not connected to this port and any such messages will be lost permanently.\n\n### docker image\n\nThis server is available as a docker image.\n\n```sh\ndocker run -it --rm \\\n  -p 3000:3000 \\\n  -p 3001:3001 \\\n  -e AWS_DEFAULT_REGION=us-east-1 \\\n  -e KINESIS_STREAM=my-stream \\\n  -e ERROR_SOCKET_PORT=3001 \\\n  quay.io/turner/kplserver\n```\n\n### sidecar\n\nIf you're consuming the KPL from an ecs/fargate container, the followning container definitions snippet from a task\ndefinition will configure this server as a sidecar container that you can talk to over sockets via `127.0.0.1:3000`.\n\n\u003cdetails\u003e\u003csummary\u003etask definition example\u003c/summary\u003e\n\n```json\n{\n  \"containerDefinitions\": [\n    {\n      \"name\": \"app\",\n      \"image\": \"1234567890.dkr.ecr.us-east-1.amazonaws.com/my-service:0.1.0\",\n      \"dependsOn\": [\n        {\n          \"containerName\": \"kpl\",\n          \"condition\": \"START\"\n        }\n      ]\n    },\n    {\n      \"name\": \"kpl\",\n      \"image\": \"quay.io/turner/kplserver:0.1.0\",\n      \"portMappings\": [\n        {\n          \"protocol\": \"tcp\",\n          \"hostPort\": 3000,\n          \"containerPort\": 3000\n        },\n        {\n          \"protocol\": \"tcp\",\n          \"hostPort\": 3001,\n          \"containerPort\": 3001\n        }\n      ],\n      \"environment\": [\n        {\n          \"name\": \"KINESIS_STREAM\",\n          \"value\": \"my-stream\"\n        },\n        {\n          \"name\": \"PORT\",\n          \"value\": \"3000\"\n        },\n        {\n          \"name\": \"ERROR_SOCKET_PORT\",\n          \"value\": \"3001\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n\u003c/details\u003e\n\n### client libraries\n\n- [Go](https://github.com/turnerlabs/kplclientgo)\n\n### development\n\n```\n Choose a make command to run\n\n  build   build jar and deps\n  start   build and start local server\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturnerlabs%2Fkplserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturnerlabs%2Fkplserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturnerlabs%2Fkplserver/lists"}