Exemplo n.º 1
0
        static void Subscribe()
        {
            IProductQueue productQueue = new ProductQueue(new Connection
            {
                HostName = "localhost",
                Port     = 5672,
                UserName = "******",
                Password = "******"
            });

            productQueue.Subscribe(product => Console.WriteLine(product.ToString()));
        }
Exemplo n.º 2
0
        static void Publish(Product product)
        {
            IProductQueue productQueue = new ProductQueue(new Connection
            {
                HostName = "localhost",
                Port     = 5672,
                UserName = "******",
                Password = "******"
            });

            productQueue.Publish(product);
        }