public void Init() { _adapter = RabbitMQAdapter.Instance; _adapter.Init("hostName", 1234, "userName", "password", 50); _rabbitMQConsumerCatchAll = new RabbitMQConsumerCatchAll("queueName", 10); _rabbitMQConsumerCatchAll.MessageReceived += OnMessageReceived; _adapter.Connect(); _adapter.ConsumeAsync(_rabbitMQConsumerCatchAll); }
public void Init() { _adapter = RabbitMQAdapter.Instance; _adapter.Init("localhost", 5672, "guest", "guest", 50); _rabbitMQConsumerCatchAll = new RabbitMQConsumerCatchAll("Math", 10); _rabbitMQConsumerCatchAll.MessageReceived += OnMessageReceived; _autoScaleConsumerCatchAll = new RabbitMQConsumerCatchAll("AutoScale", 10); _autoScaleConsumerCatchAll.MessageReceived += _autoScaleConsumerCatchAll_MessageReceived; _consumers.Add(_rabbitMQConsumerCatchAll); _adapter.Connect(); _adapter.ConsumeAsync(_autoScaleConsumerCatchAll); _adapter.ConsumeAsync(_rabbitMQConsumerCatchAll); }