{"id":18559068,"url":"https://github.com/linux-china/proto-rsocket-plugin","last_synced_at":"2025-09-14T23:37:41.998Z","repository":{"id":45953456,"uuid":"249534337","full_name":"linux-china/proto-rsocket-plugin","owner":"linux-china","description":"Protobuf to RSocket service interface","archived":false,"fork":false,"pushed_at":"2024-10-03T17:01:10.000Z","size":59,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T02:51:12.594Z","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/linux-china.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}},"created_at":"2020-03-23T20:14:55.000Z","updated_at":"2023-02-23T08:56:13.000Z","dependencies_parsed_at":"2022-09-02T18:22:33.203Z","dependency_job_id":null,"html_url":"https://github.com/linux-china/proto-rsocket-plugin","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fproto-rsocket-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fproto-rsocket-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fproto-rsocket-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fproto-rsocket-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linux-china","download_url":"https://codeload.github.com/linux-china/proto-rsocket-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248144158,"owners_count":21054876,"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-11-06T21:41:58.071Z","updated_at":"2025-04-10T02:30:37.968Z","avatar_url":"https://github.com/linux-china.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Proto to RSocket Reactive Interface\n===================================\n\n![Version](https://img.shields.io/maven-central/v/org.mvnsearch/proto-rsocket-plugin)\n\nGenerate Reactive service interfaces from services in the proto files.\n\nFor example, proto file as following:\n\n```proto\nsyntax = \"proto3\";\n\noption java_multiple_files = true;\noption java_outer_classname = \"AccountProto\";\n\npackage org.mvnsearch.account;\n\nimport \"google/protobuf/any.proto\";\nimport \"google/protobuf/wrappers.proto\";\n\nmessage Account {\n    int32 id = 1;\n    string email = 2;\n    string phone = 3;\n    int32 status = 4;\n    string nick = 5;\n}\n\nservice AccountService {\n    // find account by id\n    rpc findById(google.protobuf.Int32Value /*id*/) returns (Account);\n\n    rpc findByStatus(google.protobuf.Int32Value /*status*/) returns (stream Account);\n\n    rpc findByIdStream(stream google.protobuf.Int32Value /*idFlux*/) returns (stream Account);\n}\n```\n\n*Attention:*\n\n* If you use [protoc-gen-doc](https://github.com/pseudomuto/protoc-gen-doc), please make comment in the same line.\n\ngenerated Java Reactive interface:\n\n```java\nimport reactor.core.publisher.Flux;\nimport reactor.core.publisher.Mono;\nimport google.protobuf.Int32Value;\n\npublic interface AccountService {\n    Mono\u003cAccount\u003e findById(Int32Value id);\n\n    Flux\u003cAccount\u003e findByStatus(Int32Value status);\n\n    Flux\u003cAccount\u003e findByIdStream(Flux\u003cInt32Value\u003e idFlux);\n}\n```\n\n### How to use it\n\n* Use command line:\n\n```\n$ mvn org.mvnsearch:proto-rsocket-plugin:1.0.0-SNAPSHOT:proto2rsocket\n```\n\n* or add the plugin in your pom.xml\n\n```xml\n\n\u003cplugin\u003e\n    \u003cgroupId\u003eorg.mvnsearch\u003c/groupId\u003e\n    \u003cartifactId\u003eproto-rsocket-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.4\u003c/version\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cphase\u003egenerate-sources\u003c/phase\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003eproto2rsocket\u003c/goal\u003e\n            \u003c/goals\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n```\n\n# References\n\n* Language Guide (proto3): https://developers.google.cn/protocol-buffers/docs/proto3\n* gRPC Service definition: https://grpc.io/docs/what-is-grpc/core-concepts/\n* protoc-gen-doc: Documentation generator plugin for Google Protocol Buffers https://github.com/pseudomuto/protoc-gen-doc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinux-china%2Fproto-rsocket-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinux-china%2Fproto-rsocket-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinux-china%2Fproto-rsocket-plugin/lists"}