775 Star 2.4K Fork 904

GVP开放金融技术 / zbus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
RpcProtocol.md 929 Bytes
一键复制 编辑 原始数据 按行查看 历史
rushmore 提交于 2018-06-20 09:57 . update doc

RPC Protocol

Request

{ 
	headers: {
		id:        <message_id>,
		apiKey:    <apid_key>,
		signature: <signature>
	},
	url:      <function_url>  //[required]  
	method:   <http_method>,  //[optional]   
	body:     <param_array>   //[optional]
} 

function url can be any format of HTTP URL, if no configuration, following the simple mapping rules:

/${module}/${language_method_name}[/${param1}/${param2}/.....]

If body is populated in request, the params list in URL is ignored

If RPC is based on MQ, add MQ prefix in url,

/${mq}/${module}/${language_method_name}[/${param1}/${param2}/.....]

or, add 3 key-value pairs in headers

{
	cmd:      'pub',     
	mq:       <mq_name>,   //which MQ is the RPC based
	ack:      false        //No ACK from zbus for RPC
}

Response

{
	status:      200|400|403|404|500   //required
	body:        <data_or_exception>,
	id:          <message_id>
}
Java
1
https://gitee.com/openforce/zbus.git
git@gitee.com:openforce/zbus.git
openforce
zbus
zbus
master

搜索帮助