Configuration.decodeBGP()
Description
Appends a decodeBGP filter to the current pipeline layout.
After decoding, the output Message has:
- head
- id - Request ID as a string
- status - Status code
- isRequest - Is it a request?
- isTwoWay - Is it 2-way?
- isEvent - Is it an event?
- body - Binary data in the body
The body data is a Data object left without being decoded. To decode it, use Hessian.decode().
Syntax
pipy().pipeline().decodeDubbo()
Parameters
decodeBGP(options?)
options?
No description
Return Value
The same Configuration object.
Example
pipy().listen(20880).decodeDubbo().demuxQueue().to($=>$.replaceMessageBody(data => (JSON.encode(Hessian.decode(data)))).muxHTTP().to($=>$.connect('localhost:8080')).replaceMessageBody(data => (Hessian.encode(JSON.decode(data))))).encodeDubbo({isRequest: false,})