{"id":15706810,"url":"https://github.com/stephenlb/kafka-connect-pubnub","last_synced_at":"2025-05-12T15:42:52.860Z","repository":{"id":66632407,"uuid":"598887392","full_name":"stephenlb/kafka-connect-pubnub","owner":"stephenlb","description":"Kafka Connect for PubNub","archived":false,"fork":false,"pushed_at":"2024-01-19T18:50:45.000Z","size":58,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T14:42:33.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stephenlb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-08T02:06:11.000Z","updated_at":"2024-03-22T15:45:17.000Z","dependencies_parsed_at":"2024-01-19T19:46:57.987Z","dependency_job_id":"5d807ec1-2926-45cb-93e0-c5cce042b71e","html_url":"https://github.com/stephenlb/kafka-connect-pubnub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fkafka-connect-pubnub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fkafka-connect-pubnub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fkafka-connect-pubnub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fkafka-connect-pubnub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephenlb","download_url":"https://codeload.github.com/stephenlb/kafka-connect-pubnub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253767220,"owners_count":21961079,"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":[],"created_at":"2024-10-03T20:28:49.203Z","updated_at":"2025-05-12T15:42:52.807Z","avatar_url":"https://github.com/stephenlb.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PubNub Kafka Connector\n\nThis codebase includes a PubNub Sink Connector.\nKafka topic records can be coppied to a PubNub channel.\nThe Kafka topic name will match PubNub channel name.\n\n### ✅ Requirements\n\n* [Docker](https://www.docker.com/get-started)\n\n## ⬆️  Starting the local environment\n\nWith the connector properly built, you need to have a local environment to test it.\nThis project includes a Docker Compose file that can spin up container instances for Apache Kafka and Kafka Connect.\nAdditionally a sample producer feed starts on the `\"pubnub\"` topic.\nThis feed emits a sample message every few seconds.\n\nStart the containers using Docker Compose.\n\n```bash\ndocker compose up\n```\n\nWait until the containers `kafka` and `connect` are started and healthy.\n\n## ⏯ Deploying and the Sink Connector\n\nAfter the containers `kafka` and `connect` are started and healthy, then proceed.\nThe following command will copy data from the configured\n`Kafka Topic` name to the `PubNub Channel` with the same name.\n\n* Deploy the connector.\n\n```bash\ncurl -X POST \\\n    -d @examples/pubnub-sink-connector.json \\\n    -H \"Content-Type:application/json\" \\\n    http://localhost:8083/connectors\n```\n\nNow you can see the message deliveries with this web tool:\n[PubNub Web Console](https://stephenlb.github.io/pubnub-tools/console/console.html?channel=pubnub\u0026origin=ps.pndsn.com\u0026sub=demo\u0026pub=demo\u0026ssl=true)\n\nYou can see messages are being delivered successfully using the PubNub Web Console.\n\n## 📝 Modify Settings\n\nEdit the configuration file: `./examples/pubnub-sink-connector.json`.\nUpdate the file to include your `publish_key`, `subscribe_key` and `secret_key`.\nUpdate the `topics` to match the topics you want to sink to PubNub.\n**Add `topics.regex` to match topic patterns!**\n\n```json\n{\n    \"name\": \"pubnub-sink-connector\",\n    \"config\": {\n        \"topics\":\"pubnub,pubnub1,pubnub2\",\n        \"topics.regex\":\"\",\n        \"pubnub.publish_key\": \"demo\",\n        \"pubnub.subscribe_key\": \"demo\",\n        \"pubnub.secret_key\": \"demo\",\n        \"connector.class\": \"com.pubnub.kafka.connect.PubNubKafkaSinkConnector\",\n        \"tasks.max\": \"3\",\n        \"value.deserializer\":\"custom.class.serialization.JsonDeserializer\",\n        \"value.serializer\":\"custom.class.serialization.JsonSerializer\"\n    }\n}\n```\n\n## ⏹ Undeploy the connector\n\n* Use the following command to undeploy the connector from Kafka Connect:\n\n```bash\ncurl -X DELETE \\\n    http://localhost:8083/connectors/pubnub-sink-connector\n```\n\n## ⬇️  Stopping the local environment\n\n* Stop the containers using Docker Compose.\n\n```bash\ndocker compose down\n```\n\n## ⚙️  Building the connector locally\n\nBuild the Kafka Connect connector locally\n\n* [Java 11+](https://openjdk.org/install)\n* [Maven 3.8.6+](https://maven.apache.org/download.cgi)\n\n```bash\nmvn clean package\n```\n\n💡 A file named `target/pubnub-kafka-connector-1.x.jar` will be created.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenlb%2Fkafka-connect-pubnub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephenlb%2Fkafka-connect-pubnub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenlb%2Fkafka-connect-pubnub/lists"}