How to handle message from Query().

Skip to first unread message

กชนัฐ วิสกี้

Apr 26, 2018, 5:24:05 PM4/26/18
to Serf
I'm very new to Serf.
I want to broadcast message like I did in memberlist but I don't know I should use whether UserEvent or Query.

Now, I'm trying Query(). and set the limit to 1400 bytes (since I always use in localhost, I guess it's okay?)
The next problem is
1. when I use Query() to broadcast message, It sends broadcast message to other nodes too many time and sends to origin node too, which I don't want it to
2. I don't know how to handle incoming messages, since I cannot overwrite NotifyMsg() like in memberlist.

this is my configuraiton:

Any other good suggestions such like basic configuration, example usage, ... are welcome too!


Reply all
Reply to author
0 new messages