Ejemplo n.º 1
0
        public Consumer(String brokerAddress)
        {
            _context = _sharedContext;
            _address = brokerAddress;

            _sender = new RequestSender(_address, ZMQ.SocketType.REQ, _context.ZmqContext);
            _infoResponse = _sender.Send(new BrokerInfoRequest()) as BrokerInfoResponse;

            if (_infoResponse == null)
                throw new Exception("Cannot create producer, because broker info request was unsuccessfull");
        }
Ejemplo n.º 2
0
        public Consumer(String brokerAddress)
        {
            _context = _sharedContext;
            _address = brokerAddress;

            _sender       = new RequestSender(_address, ZMQ.SocketType.REQ, _context.ZmqContext);
            _infoResponse = _sender.Send(new BrokerInfoRequest()) as BrokerInfoResponse;

            if (_infoResponse == null)
            {
                throw new Exception("Cannot create producer, because broker info request was unsuccessfull");
            }
        }