Esempio n. 1
0
        public RestBusSubscriber(IMessageMapper messageMapper )
        {
            exchangeInfo = messageMapper.GetExchangeInfo();
            subscriberId = AmqpUtils.GetRandomId();

            this.connectionFactory = new ConnectionFactory();
            connectionFactory.Uri = exchangeInfo.ServerAddress;
            connectionFactory.RequestedHeartbeat = Client.RestBusClient.HEART_BEAT;
        }
Esempio n. 2
0
        public RestBusSubscriber(IMessageMapper messageMapper)
        {
            exchangeInfo = messageMapper.GetExchangeInfo();
            subscriberId = AmqpUtils.GetRandomId();

            this.connectionFactory = new ConnectionFactory();
            connectionFactory.Uri  = exchangeInfo.ServerAddress;
            connectionFactory.RequestedHeartbeat = Client.RestBusClient.HEART_BEAT;
        }
Esempio n. 3
0
        /// <summary>Initializes a new instance of the <see cref="T:RestBus.RabbitMQ.RestBusClient" /> class.</summary>
        public RestBusClient(IMessageMapper messageMapper)
            : base(new HttpClientHandler(), true)
        {
            //Set default HttpClient related fields
            timeout = TimeSpan.FromSeconds(100);
            MaxResponseContentBufferSize = int.MaxValue;
            //TODO: Setup cancellation token here.

            //Configure RestBus fields/properties
            this.messageMapper = messageMapper;
            this.exchangeInfo = messageMapper.GetExchangeInfo();
            this.clientId = AmqpUtils.GetRandomId();
            this.exchangeName = AmqpUtils.GetExchangeName(exchangeInfo);
            this.callbackQueueName = AmqpUtils.GetCallbackQueueName(exchangeInfo, clientId);

            //Map request to RabbitMQ Host and exchange,
            this.connectionFactory = new ConnectionFactory();
            connectionFactory.Uri = exchangeInfo.ServerAddress;
            connectionFactory.RequestedHeartbeat = HEART_BEAT;
        }