public void Publish(string channel, HeartbeatMessage retMessage) { _conn.Publish(channel, Encoding.Default.GetBytes(retMessage.ToString())); }
private void _heartbeat_Elapsed(object sender, ElapsedEventArgs e) { HeartbeatMessage heartbeat = HeartbeatMessage.Parse(_serviceInfo); _conn.Publish("MOL.HEARTBEAT", Encoding.Default.GetBytes(heartbeat.ToString())); }