public ReceiveTransportAgent(InMemoryReceiveEndpointContext context, IInMemoryQueue queue) { _context = context; _queue = queue; _dispatcher = context.CreateReceivePipeDispatcher(); _consumerHandle = queue.ConnectConsumer(this); Task.Run(() => Startup()); }
public ReceiveEndpointContext CreateReceiveEndpointContext() { var builder = _hostConfiguration.TransportProvider.CreateConsumeTopologyBuilder(); var queueName = _configuration.InputAddress.GetQueueOrExchangeName(); builder.Queue = queueName; builder.QueueDeclare(queueName, _configuration.ConcurrencyLimit); builder.Exchange = queueName; builder.QueueBind(builder.Exchange, builder.Queue); _configuration.Topology.Consume.Apply(builder); var context = new InMemoryReceiveEndpointContext(_hostConfiguration, _configuration); context.GetOrAddPayload(() => _hostConfiguration.HostTopology); return(context); }
public InMemoryReceiveTransport(InMemoryReceiveEndpointContext context, string queueName) { _context = context; _queueName = queueName; }