Hello guys, as im reading the docs and using at th...
# rsocket
g
Hello guys, as im reading the docs and using at the same time the kotlin-rsocket-impl, i have a question. I do not really get why in the channel api there is an
initPayload: Payload
and as second argument the flow. If i need only the flow payload should i just fill it with
Payload.Empty
the init? Thanks in advance for anyone who can point me to the right direction 🙂
o
You can, but most of the time initPayload should contain routing, tracing metadata
🙏 1
g
I guess this is because in a channel you are allowed to change mid-time your routing metadata? Or the init payload acts like a sort of scout?.
o
init payloads act as
Request Setup
, so things like routing, tracing, or override of data mime type for channel is sent only once (as per spec, those metadata types are specified only for metadata in frame which initiate transport stream) it was before just
requestChannel(flow)
but changed, as on responder side it's hard with
Flow
to intercept handling of first element
🙏 1