{"id":28060100,"url":"https://github.com/tsmx/kafkajs-file-consumer","last_synced_at":"2025-10-07T21:05:55.960Z","repository":{"id":287960325,"uuid":"966367813","full_name":"tsmx/kafkajs-file-consumer","owner":"tsmx","description":"File-consumer project for the \"Using Apache Kafka for transferring files\" tutorial","archived":false,"fork":false,"pushed_at":"2025-04-28T19:13:18.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-19T13:52:52.955Z","etag":null,"topics":["apache-kafka","file-transfer","kafka","kafkajs"],"latest_commit_sha":null,"homepage":"https://tsmx.net/using-apache-kafka-for-transferring-files/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsmx.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-14T20:16:18.000Z","updated_at":"2025-04-28T19:13:21.000Z","dependencies_parsed_at":"2025-04-14T21:32:14.702Z","dependency_job_id":"f20c9ac9-9126-4a16-ba24-345cfae86da6","html_url":"https://github.com/tsmx/kafkajs-file-consumer","commit_stats":null,"previous_names":["tsmx/kafkajs-file-consumer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tsmx/kafkajs-file-consumer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsmx%2Fkafkajs-file-consumer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsmx%2Fkafkajs-file-consumer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsmx%2Fkafkajs-file-consumer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsmx%2Fkafkajs-file-consumer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsmx","download_url":"https://codeload.github.com/tsmx/kafkajs-file-consumer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsmx%2Fkafkajs-file-consumer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278846797,"owners_count":26056183,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["apache-kafka","file-transfer","kafka","kafkajs"],"created_at":"2025-05-12T08:38:12.717Z","updated_at":"2025-10-07T21:05:55.926Z","avatar_url":"https://github.com/tsmx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KafkaJS file consumer\n\nConsumer example for the [Using Apache Kafka for transferring files](https://tsmx.net/using-apache-kafka-for-transferring-files/) article.\n\nUses the [KafkaJS](https://kafka.js.org/) library for Kafka client functionality.\n\n## Usage\n\nFirst, [get Kafka up \u0026 running](https://tsmx.net/using-apache-kafka-for-transferring-files/#Getting_Kafka_up_running) and [create an appropriate topic](https://tsmx.net/using-apache-kafka-for-transferring-files/#Creating_a_topic) as described in the tutorial.\n\nTo consume file messages, simply start the consumer app. Received files from Kafka will be written to the `output/` subfolder.\n\n```bash\n$ node app.js\n{\"level\":\"INFO\",\"timestamp\":\"2025-04-16T20:24:47.647Z\",\"logger\":\"kafkajs\",\"message\":\"[Consumer] Starting\",\"groupId\":\"kafkajs-group\"}\n{\"level\":\"INFO\",\"timestamp\":\"2025-04-16T20:25:07.791Z\",\"logger\":\"kafkajs\",\"message\":\"[ConsumerGroup] Consumer has joined the group\",\"groupId\":\"kafkajs-group\",\"memberId\":\"kafkajs-file-consumer-fe505a61-5d2a-47ca-bbbc-07ec4df8c3d0\",\"leaderId\":\"kafkajs-file-consumer-fe505a61-5d2a-47ca-bbbc-07ec4df8c3d0\",\"isLeader\":true,\"memberAssignment\":{\"filetransfer\":[0]},\"groupProtocol\":\"RoundRobinAssigner\",\"duration\":20140}\nFile example.jpg written. (2690215 Bytes)\n```\n\nTo produce file messages, use the [producer example](https://github.com/tsmx/kafkajs-file-producer).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsmx%2Fkafkajs-file-consumer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsmx%2Fkafkajs-file-consumer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsmx%2Fkafkajs-file-consumer/lists"}