Skip to content

Conversation

@andrebetiolo
Copy link

…nnects to receive the messages

@purehyperbole
Copy link
Member

purehyperbole commented Aug 1, 2018

Hi, thanks for the PR. Could you clarify what this is implementing?

From what i can tell, it looks like it's achieving the same thing as AutoReplay, which sends all messages published to a stream to each new connection if enabled.

@andrebetiolo
Copy link
Author

It will be a pleasure, I am implementing a map of bus seats in real time.

So when the client goes to the map page, I'll say '/ sse? Stream = travelID'. my server starts with AutoStream, because if it does not exist the stream is created and all the changes of the seats are sent through the method 'Publish', which already verifies if there is the stream before sending the messages. The problem was that every time a new client enters the stream EventLogs would send the previous changes and in my case I do not need this, so I created SaveEvents, with this you can have the option of not saving the events, just give a broadcast for new events

@purehyperbole purehyperbole changed the base branch from master to configurable-autostream August 1, 2018 13:09
@purehyperbole purehyperbole merged commit fc877b8 into r3labs:configurable-autostream Aug 1, 2018
@purehyperbole
Copy link
Member

Great, thanks for clarifying. I'll need to implement a few changes to this, but i'll get what you need merged today. Thanks again

@purehyperbole
Copy link
Member

I've moved the auto replay configuration to the server struct, so you can set server.AutoReplay = false to disable it on automatic stream creation.

@andrebetiolo
Copy link
Author

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants