Ejemplo n.º 1
0
        public RabbitMq(bool durable)
        {
            _connection = _factory.CreateConnection();
            _session = durable ? _connection.CreateDurableSession() : _connection.CreateNonDurableSession();
            _props = _session.Model.CreateBasicProperties();
            _props.SetPersistent(true);

            _consumeThread = new Thread(ReadMessages);
        }