{"id":24456230,"url":"https://github.com/yanghua/banyan","last_synced_at":"2025-04-13T02:29:33.239Z","repository":{"id":19140753,"uuid":"22370830","full_name":"yanghua/banyan","owner":"yanghua","description":"a message bus implemented with RabbitMQ","archived":false,"fork":false,"pushed_at":"2023-12-16T17:26:25.000Z","size":42178,"stargazers_count":146,"open_issues_count":3,"forks_count":63,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-26T20:01:38.908Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/yanghua.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":"2014-07-29T07:08:09.000Z","updated_at":"2024-10-27T03:09:41.000Z","dependencies_parsed_at":"2022-07-13T01:20:28.024Z","dependency_job_id":null,"html_url":"https://github.com/yanghua/banyan","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/yanghua%2Fbanyan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanghua%2Fbanyan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanghua%2Fbanyan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanghua%2Fbanyan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yanghua","download_url":"https://codeload.github.com/yanghua/banyan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657749,"owners_count":21140839,"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":"2025-01-21T02:15:59.241Z","updated_at":"2025-04-13T02:29:33.211Z","avatar_url":"https://github.com/yanghua.png","language":"Java","funding_links":[],"categories":["进程间通信"],"sub_categories":["Spring Cloud框架"],"readme":"#overview\n\n[![Build Status](https://travis-ci.org/yanghua/banyan.svg?branch=messagebus-ng)](https://travis-ci.org/yanghua/banyan)\n\n![img 15][15]\n\n\n```\nbanyan is a tree has thick branches which grows in the East Asia. \n```\nThanks for [@ok95](https://github.com/ok95) \u0026 [@Joy-Zhang](https://github.com/Joy-Zhang) given the good idea \u0026 guidance.\n\n![img 14][14]\n\nbanyan used to communicate and integrate over multi-app. It depends on [RabbitMQ](http://www.rabbitmq.com/) as backend broker(message exchanger). Most scenario:\n\n* enterprise information Integration\n* oriented-component \u0026 oriented-module distributed developer\n* infrastructure for esb or soa\n* json-rpc / IDL-RPC(thrift)\n* configured compress/uncompress\n* http-bridge for all platform\n* web-console UI\n\nthe necessity of encapsulating with RabbitMQ:\n\n* provide router pattern\n* embed permission into client-jar\n* removed create \u0026 delete \u0026 update operation from client, replaced with central-register mode\n\nmore information please see : [banyan-category](http://blog.csdn.net/column/details/banyan.html)\n\n##tree topology structure\nthe message bus's implementation is based on Rabbitmq. It can takes advantage of multiple message exchange-types rabbitmq provided and builds many kinds of router pattern. The message bus's router topology lists below:\n\n\n![img 3][3]\n\nthe advantages of the tree topology:\n\n* hide the router topology from client-caller (just need to know the `proxy` node)\n* multiple message communication pattern (p2p, pub/sub, broadcast)\n* implement the message log without interrupting the message channel\n* communication-policy configure once , push everywhere\n\n##web-console\nbanyan has its' own web console that built as a Apache-ofbiz's component. The web console provide a dashboard about rabbitmq : \n\n![img 16][16]\n\nand some core model's maintenance such as queue : \n\n![img 17][17]\n\n##Restful API\n\n* [apis](https://github.com/yanghua/banyan/tree/master/httpbridge)\n\n##scenario \u0026 usage\n\n###produce \u0026 consume\n\n* [produce](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FProduceConsume.java#L34) / [pull consume](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FProduceConsume.java#L46)\n* [produce](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FProduceConsume.java#L34) / [push consume](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FProduceConsume.java#L64)\n* [produce](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FProduceConsume.java#L34) / [async consume with another thread](https://github.com/yanghua/banyan/blob/master/scenario%2Fsrc%2Fmain%2Fjava%2Fcom%2Fmessagebus%2Fscenario%2Fclient%2FProduceConsume.java#L91)\n* [produce-loopback](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FProduceConsumeLoopback.java#L15) / [consume-loopback](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FProduceConsumeLoopback.java#L15)\n\n\n###request \u0026 response\n\n* [request](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FRequestResponse.java#L35) / [response](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FRequestResponse.java#L35) \n\n###publish \u0026 subscirbe\n\n* [publish](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FPublishSubscribe.java#L31) / [subscribe](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FPublishSubscribe.java#L31)\n\n###broadcast \u0026 notification-handler\n\n* [broadcast](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FBroadcast.java#L31) / [notification-handler](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FBroadcast.java#L31)\n\n###json-rpc(wrapped-offical-java-client)\n\n* [rpc-request](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FRpcRequestResponse.java#L28) / [rpc-response](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Fapi%2FRpcRequestResponse.java#L28)\n\n###thrift-rpc(thrid-party-rpc-integrated)\n\n* [rpc-request](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Ffeature%2FThriftWithAMQPRpc.java#L36) / [rpc-response](https://github.com/yanghua/banyan/blob/master/client%2Fsrc%2Ftest%2Fjava%2Fcom%2Fmessagebus%2Fclient%2Ffeature%2FThriftWithAMQPRpc.java#L59)\n\n\n###http-restful\n\n* [http-apis](https://github.com/yanghua/banyan/tree/master/scenario/src/main/java/com/messagebus/scenario/httpBridge)\n\n##benchmark\nit shows the  `client` performance:\n\n###hardware\nclient : \n\n```\nOS : Mac os x Yosemite (version 10.10)\nProcessor : 2.5GHz Intel Core i5\nMemory : 8GB 1600 MHz DDR3\nJDK Version : 1.7.0_45\n```\n\nserver :\n\n```\nOS : Ubuntu Server 14.04.1 (GNU/Linux 3.13.0-37-generic x86_64)\nProcessor : Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz (8核)\nMemory : 8GB\nJDK Version : 1.7.0_72\n```\n\n###produce\n* single thread，multiple message size ，cycle send，compare：\n\n![img 10][10]\n\n* single thread，same message size，use client channel pool or not，compare：\n\n![img 11][11]\n\n###consume\n* single thread，multiple message size，async receive，compare：\n\n![img 12][12]\n\n* single thread，same message size，use client channel pool or not，compare：\n\n![img 13][13]\n\n##licence\nCopyright (c) 2014-2015 yanghua. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n\n```\nhttp://www.apache.org/licenses/LICENSE-2.0\n```\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\n\n\n[1]:https://raw.githubusercontent.com/yanghua/messagebus/master/screenshots/overview/architecture.png\n[2]:https://raw.githubusercontent.com/yanghua/messagebus/master/screenshots/overview/module-dependency.png\n[3]:https://raw.githubusercontent.com/yanghua/messagebus/master/screenshots/overview/router-topology.png\n[4]:https://raw.githubusercontent.com/yanghua/messagebus/master/screenshots/client/carry-inherits.png\n[5]:https://raw.githubusercontent.com/yanghua/messagebus/master/screenshots/client/handle-chain.png\n[6]:https://raw.githubusercontent.com/yanghua/messagebus/master/screenshots/client/handler-chain-config.png\n[7]:https://raw.githubusercontent.com/yanghua/messagebus/master/screenshots/client/node.png\n[8]:https://raw.githubusercontent.com/yanghua/messagebus/master/screenshots/client/node-db-info.png\n[9]:https://raw.githubusercontent.com/yanghua/messagebus/master/screenshots/common/message-design.png\n[10]:https://raw.githubusercontent.com/yanghua/messagebus/master/screenshots/benchmark/produce/singleThreadClientVSOriginal.png\n[11]:https://raw.githubusercontent.com/yanghua/messagebus/master/screenshots/benchmark/produce/singleThreadOptionPool.png\n[12]:https://raw.githubusercontent.com/yanghua/messagebus/master/screenshots/benchmark/consume/singleThreadClientVSOriginal.png\n[13]:https://raw.githubusercontent.com/yanghua/messagebus/master/screenshots/benchmark/consume/singleThreadOptionPool.png\n[14]:https://raw.githubusercontent.com/yanghua/banyan/master/screenshots/overview/rabbitmq-offical-screenshot.png\n[15]:https://raw.githubusercontent.com/yanghua/banyan/master/screenshots/overview/banyan.jpg\n[16]:https://raw.githubusercontent.com/yanghua/banyan/master/screenshots/overview/webconsole-dashboard.png\n[17]:https://raw.githubusercontent.com/yanghua/banyan/master/screenshots/overview/webconsole-queueManage.png","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanghua%2Fbanyan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyanghua%2Fbanyan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanghua%2Fbanyan/lists"}