コード例 #1
0
        public RabbitMqSubscriptionBinder(IServiceBus bus)
        {
            _bindings = new Dictionary<Guid, MessageName>();

            _inboundTransport = bus.Endpoint.InboundTransport as InboundRabbitMqTransport;
            if (_inboundTransport == null)
                throw new ConfigurationException(
                    "The bus must be receiving from a RabbitMQ endpoint for this interceptor to work");

            _inputAddress = _inboundTransport.Address.CastAs<IRabbitMqEndpointAddress>();

            _messageNameFormatter = _inboundTransport.MessageNameFormatter;
        }
コード例 #2
0
        public PublishEndpointInterceptor(IServiceBus bus)
        {
            _bus = bus;

            _inboundTransport = _bus.Endpoint.InboundTransport as InboundRabbitMqTransport;
            if (_inboundTransport == null)
            {
                throw new ConfigurationException("The bus must be receiving from a RabbitMQ endpoint for this interceptor to work");
            }

            _address = _inboundTransport.Address.CastAs <IRabbitMqEndpointAddress>();

            _added = new Dictionary <Type, UnsubscribeAction>();
        }
コード例 #3
0
        public RabbitMqSubscriptionBinder(IServiceBus bus)
        {
            _bindings = new Dictionary <Guid, MessageName>();

            _inboundTransport = bus.Endpoint.InboundTransport as InboundRabbitMqTransport;
            if (_inboundTransport == null)
            {
                throw new ConfigurationException(
                          "The bus must be receiving from a RabbitMQ endpoint for this interceptor to work");
            }

            _inputAddress = _inboundTransport.Address.CastAs <IRabbitMqEndpointAddress>();

            _messageNameFormatter = _inboundTransport.MessageNameFormatter;
        }