public Consumer(IServiceProvider services) { _service = services; _logger = services.GetRequiredService <ILogger <Consumer> >(); _connector = services.GetRequiredService <IConnector>(); _channelSettings = services.GetRequiredService <RMQChannelSettings>(); }
public RpcClient(ILogger <RpcClient> logger, IConnector connector, RMQChannelSettings channelSettings) { _logger = logger; _connector = connector; _channelSettings = channelSettings; _channel = Connection.CreateModel(); // create a non-durable, exclusive, autodelete queue with a generated name _replyQueueName = _channel.QueueDeclare().QueueName; CreateConsumer(); }