Exemplo n.º 1
0
        public RabbitMqClient Publish(ConnectionFactory factory, int index, string tag, string fileName = "")
        {
            RabbitMqClient client = new RabbitMqClient(factory.UserName, factory.Password, factory.HostName, factory.VirtualHost, factory.Port, tag);

            Clients.Add(client);
            client.Index = index;
            client.Publish(factory, fileName);

            return(client);
        }
Exemplo n.º 2
0
        public RabbitMqClient Publish(string uri, int index, string cached = "")
        {
            RabbitMqClient client = new RabbitMqClient(uri);

            Clients.Add(client);
            client.Index = index;
            client.Publish(new ConnectionFactory
            {
                Uri = new Uri(uri)
            }, cached);

            return(client);
        }