public ServiceInfo EmitTopicMessage() { var status = ServiceInfoFactory.CreateServiceDefinition(new ServiceInfo { Port = Convert.ToInt32(ServiceConfig.Reader.Port) }); var topics = new TopicFactory(ConnectionConfig.GetFactoryDefault(), new JsonMessageSerializer(), new ConsoleLog(), status.Version); topics.PublishMessage(status, new string[] { Topics.Images, Topics.Text, Topics.Url, Topics.Video }); return status; }
private void Sync() { var service = ServiceInfoFactory.CreateServiceDefinition(ServiceDefinition); var topics = new TopicFactory( ConnectionConfig.GetFactoryDefault(), new JsonMessageSerializer(), new ConsoleLog(), service.Version, RegistrySettings.RegistryStatsExchange); topics.PublishMessage(service, new string[] { "status" }); }