jcelliott / turnpike

Go implementation of a WAMP (Web Application Messaging Protocol) client and router
MIT License
258 stars 88 forks source link

Initial publish packet for new subscribers #36

Open beatgammit opened 10 years ago

beatgammit commented 10 years ago

Often it's useful to not have to wait for the next publish before receiving data, but to receive a packet just after subscribing. This is useful if you're subscribing to settings changes or any other persistent but mutable data.

There should be a hook or a setting somewhere to configure this.

jcelliott commented 9 years ago

There is an alpha-stage document for something similar in the WAMP advanced spec:

https://github.com/tavendo/WAMP/blob/master/spec/advanced/event-history.md

You would just set the limit=1 to get only the last event.