clear message queue when server not in live

37 views
Skip to first unread message

henr...@insightrobotics.com

unread,
Jul 28, 2015, 11:33:48 PM7/28/15
to zerorpc
Dear All,
I have one problem in zeroRPC message queue. When zeroRPC server side not in live and client side send some message to server. The message will keep in queue. Server will received all message after start run. I want to know how to clear all message when server not in live?

Brgs,
Henry,

François-Xavier Bourlet

unread,
Jul 29, 2015, 4:45:45 AM7/29/15
to zerorpc

You cannot easily do that. You never have any guaranties about where a msg that you have handed to zerorpc is. It could be in flight in some zerorpc spawned coroutine. It could be in processing by zmq, in the zmq queue, in the TCP queue, on the way through the network, on the different queues and buffer of the receiver side etc.

Note that you can play with the timeout and heartbeat value in order to get notified of possible loss of msgs (again you can never be sure with the network, it could be that you never got the response).

If you don't want to send any msgs until the server is ready or running you can make your server the client and vice versa. The server now client will be the one requesting msgs from the client now server.  You can still bind/connect in the order you want.


--
You received this message because you are subscribed to the Google Groups "zerorpc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zerorpc+u...@googlegroups.com.
To post to this group, send email to zer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zerorpc/daa5cbfc-beb2-4742-9b05-6a012462aa62%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

henr...@insightrobotics.com

unread,
Jul 29, 2015, 5:07:34 AM7/29/15
to zerorpc, bom...@gmail.com
Thank you very much! But i already tried to use timeout and heatbeat but still can not fixed the problem yet. 
Reply all
Reply to author
Forward
0 new messages