You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.
Q: Is it possible to publish topics to the server before it starts serving network requests?
This might make it possible to implement persistent retains as a separate process: i.e. log all retained messages to file or some database via a listener subscribed to "#", then on startup have the server go through the saved data and "pre-publish" them as a way to prime the in-memory cache of SurgeMQ.
-jcw
The text was updated successfully, but these errors were encountered:
Right now the retained messages are stored in a Topic-Trie.
So they are just as persistent as any other message in the broker (that is in-memory-only atm).
I don't see the point in implementing persistency for retained messages when everything else is still in-memory.
(A solution to the broker-wide persistency problem most probably brings in the retained message persistency)
So if I understand it correctly, I can call func (*Server) Publish on the server between the creation of that Server object and the call to func (*Server) ListenAndServe? This would allow pre-loading retained messages before the first client has a chance to connect, which is exactly what I'm after.
@jcw you need to tag me if you want me to read that in time. ;)
In theory - yes.
ListenAndServe is only responsible for instantiating new sessions for incoming TCP connections.
But I rewrote that part completely so I cannot assure you that it will work our of the box.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Q: Is it possible to publish topics to the server before it starts serving network requests?
This might make it possible to implement persistent retains as a separate process: i.e. log all retained messages to file or some database via a listener subscribed to "#", then on startup have the server go through the saved data and "pre-publish" them as a way to prime the in-memory cache of SurgeMQ.
-jcw
The text was updated successfully, but these errors were encountered: