-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pubsub support #5
Comments
In progress on |
Current pubsub message format, received as an event in an event-stream:
|
There is also the possibility of an error message: [removed] |
Just double checked this, and the format is more like
Which I think is the the best approach. 😁 |
Ah I miswrote that, I think you did too though. It would actually be like:
The |
If you're happy with this format, I will add it to the spec in #4. I know there were some concerns about the levels of encodings. |
Yeah, one thing that's feeling a bit off is the encoding bit. What do you think about a querystring param for the encoding of the message body? E.g. Then the default could be the same as |
Also, is there a way to publish a data to be sent to a particular peer identified by it's |
You can only send to specific topics using pubsub, not to specific peers. You could send a message to a secret topic only you and your peer know. |
Cool, sounds good then, forgot I mentioned it. 😁 |
Added support for format parameters in 1998b75. Supported formats are This adds a new kind of error message, for when decoding fails.
|
/pubsub/
path to the gatewayGET /pubsub/{topic}/
with Accept=event-stream => Get an event stream of events by subscriing to that topicid
of the eventevent
name, or omit the event name entirely so it'll be the default "message"POST /pubsub/{topic}/ {body here}
publish data to that topicLimitations: We need to either use text mode or a base64 encoding to make things easier to work with browsers. e.g. with https://developer.mozilla.org/en-US/docs/Web/API/atob
The text was updated successfully, but these errors were encountered: