{"id":26796628,"url":"https://github.com/disc99/protocol-buffers-spring-cloud-stream","last_synced_at":"2025-04-22T20:18:46.530Z","repository":{"id":75317207,"uuid":"137600731","full_name":"disc99/protocol-buffers-spring-cloud-stream","owner":"disc99","description":"Protocol Buffers base messaging for Spring Cloud Stream","archived":false,"fork":false,"pushed_at":"2018-07-30T06:43:45.000Z","size":60,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T20:18:42.272Z","etag":null,"topics":["java","protobuf","protocol-buffers","spring","spring-cloud-stream"],"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/disc99.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":"2018-06-16T18:08:34.000Z","updated_at":"2023-02-10T16:31:23.000Z","dependencies_parsed_at":"2023-06-06T03:00:23.732Z","dependency_job_id":null,"html_url":"https://github.com/disc99/protocol-buffers-spring-cloud-stream","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/disc99%2Fprotocol-buffers-spring-cloud-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disc99%2Fprotocol-buffers-spring-cloud-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disc99%2Fprotocol-buffers-spring-cloud-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disc99%2Fprotocol-buffers-spring-cloud-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/disc99","download_url":"https://codeload.github.com/disc99/protocol-buffers-spring-cloud-stream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250316071,"owners_count":21410477,"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":["java","protobuf","protocol-buffers","spring","spring-cloud-stream"],"created_at":"2025-03-29T18:28:42.156Z","updated_at":"2025-04-22T20:18:46.522Z","avatar_url":"https://github.com/disc99.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# protocol-buffers-spring-cloud-stream\nProtocol Buffers base messaging for Spring Cloud Stream\n\n## Set up\nAdd dependency for your project.\n\n```gradle:build.gradle\nrepositories {\n    // ...\n    maven {url 'https://dl.bintray.com/disc99/maven'}\n    // ...\n}\n\ndependencies {\n    // ...\n    compile \"io.disc99:protocol-buffers-spring-cloud-stream:${BUILD_VERSION}\"\n    // ...\n}\n```\n\n## How to use\nUsage is the same as normal Protocol Buffers and Spring Cloud Stream.\n\nThe only difference is to specify `content-type: application/x-protobuf` for application.yaml.\n\n### proto file\n\n```proto:task.proto\nsyntax = \"proto3\";\n\noption java_multiple_files = true;\noption java_package = \"com.example.task\";\n\nmessage TaskCreated {\n    string id = 1;\n    string name = 2;\n}\n```\n\n\n### Source Application\n\n```yaml:application.yaml\nspring:\n  cloud:\n    stream:\n      bindings:\n        output:\n          destination: tasks\n          content-type: application/x-protobuf # for Protocol Buffers\n          producer:\n            partitionKeyExpression: \"1\"\n```\n\n```Java\n@EnableBinding(Source.class)\n@AllArgsConstructor\nclass Publisher {\n\n    Source source;\n\n    void create() {\n        TaskCreated task = // ...\n        Message\u003cTaskCreated\u003e message = new GenericMessage\u003c\u003e(task);\n        source.output().send(message);\n    }\n}\n```\n\n### Sink Application\n\n```yaml:application.yaml\nspring:\n  cloud:\n    stream:\n      bindings:\n        input:\n          destination: tasks\n          content-type: application/x-protobuf # for Protocol Buffers\n```\n\n```Java\n@EnableBinding(Sink.class)\nclass Subscriber {\n\n    @StreamListener(Sink.INPUT)\n    void handle(TaskCreated message) {\n        System.out.println(message);\n    }\n}\n```\n\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2018 @disc99\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisc99%2Fprotocol-buffers-spring-cloud-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdisc99%2Fprotocol-buffers-spring-cloud-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisc99%2Fprotocol-buffers-spring-cloud-stream/lists"}