{"id":21236226,"url":"https://github.com/dbiir/jdbc-for-kafka","last_synced_at":"2026-02-06T00:32:46.138Z","repository":{"id":35991376,"uuid":"40283121","full_name":"dbiir/jdbc-for-kafka","owner":"dbiir","description":"The java consumer API of kafka is tedious. This is an easy-to-use JDBC for kafka. ","archived":false,"fork":false,"pushed_at":"2015-08-06T08:03:56.000Z","size":256,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-18T06:24:36.847Z","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":"jdf/peasycam","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbiir.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":"2015-08-06T03:51:29.000Z","updated_at":"2025-06-08T20:11:45.000Z","dependencies_parsed_at":"2022-07-08T22:45:20.112Z","dependency_job_id":null,"html_url":"https://github.com/dbiir/jdbc-for-kafka","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dbiir/jdbc-for-kafka","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbiir%2Fjdbc-for-kafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbiir%2Fjdbc-for-kafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbiir%2Fjdbc-for-kafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbiir%2Fjdbc-for-kafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbiir","download_url":"https://codeload.github.com/dbiir/jdbc-for-kafka/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbiir%2Fjdbc-for-kafka/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29140174,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T23:14:48.546Z","status":"ssl_error","status_checked_at":"2026-02-05T23:14:35.724Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-21T00:08:15.549Z","updated_at":"2026-02-06T00:32:46.119Z","avatar_url":"https://github.com/dbiir.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jdbc-for-kafka\nThe java consumer API of kafka is tedious. This is an easy-to-use JDBC for kafka. \n\n## Dependency\nThis jdbc relies on the SimpleConsumer in kafka.\nSo you have to use it with kafka_2.xx-0.x.x.x.jar, see https://www.apache.org/dyn/closer.cgi?path=/kafka/0.8.2.1/kafka_2.10-0.8.2.1.tgz\nfor downloading kafka, extract kafka, the jar-balls can be found in the libs sub directory.\n\n## Usage\nYou can clone this repo, there is a jdbc-for-kafka-x.x.x.jar in the root directory. add this jar file and the kafka jar file into your java project.\n\nHere is the example test code:\n\u003e       Class.forName(\"cn.edu.ruc.kafka.Driver\");\n        Properties info = new Properties();\n        info.setProperty(\"role\",\"consumer\");\n        info.setProperty(\"client.id\", \"12345\");\n        Connection conn = DriverManager.getConnection(\"kafka://log04:9092/test\", info);\n        Statement st = conn.createStatement();\n        ResultSet rs = st.executeQuery(Query.GET_LEADER_PARTITIONS_METADATA);\n        while (rs.next())\n        {\n                System.out.println(((Broker)rs.getObject(\"leader\")).host() + \", \" + rs.getInt(\"partitionId\") + \", \" + rs.getInt(\"sizeInBytes\"));\n        }\n        st.close();\n        conn.close();\n        \nA full example of using jdbc-for-kafka can be found in src/cn/edu/ruc/kafka/test/KafkaJDBCTest\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbiir%2Fjdbc-for-kafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbiir%2Fjdbc-for-kafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbiir%2Fjdbc-for-kafka/lists"}