Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

31 lines (24 sloc) 2.03 KB

Routing Metadata Extension

This extension specification is currently incubating. While incubating the version is 0.

Introduction

When two system are communicating via RSocket, there are often logical divisions in the messages that are sent from the requester to the responder. These logical divisions can often be implemented by the responder as "routes" for messages to be sent to. This extension specification provides an interoperable structure for metadata payloads to contain routing information. It is designed such that an arbitrary collection of tags (strings) can be used by the responder to route messages and any individual tag (or all included tags) can be ignored.

Metadata Payload

This metadata type is intended to be used per stream, and not per connection nor individual payloads and as such it MUST only be used in frame types used to initiate interactions. This includes REQUEST_FNF, REQUEST_RESPONSE, REQUEST_STREAM, and REQUEST_CHANNEL. The Metadata MIME Type is message/x.rsocket.routing.v0.

Metadata Contents

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Tag Length   |              Tag                             ...
    +---------------+-----------------------------------------------+
    |  Tag Length   |              Tag                             ...
    +---------------+-----------------------------------------------+
                                   ...
  • Tag Payload: Any number of complete tag payloads.
    • Tag Length: Tag Length in bytes.
    • Tag: Token used for routing. The string MUST NOT be null terminated. Examples include URI-style routes (/person, /address), or artibrary metadata (ios-client, android-client).
You can’t perform that action at this time.