public ServerToUserMQClient(IRabbitMQContext rabbitMQContext, IOptions <ServerMessagesQueueConfiguration> options) { _queueConfiguration = options.Value; _model = rabbitMQContext.Connection.CreateModel(); _model.ExchangeDeclare(_queueConfiguration.ExchangeName, _queueConfiguration.ExchangeType, _queueConfiguration.Durable, autoDelete: false); _model.QueueDeclare(_queueConfiguration.QueueName, _queueConfiguration.Durable, _queueConfiguration.Exclusive, _queueConfiguration.AutoDelete); _model.QueueBind(_queueConfiguration.QueueName, _queueConfiguration.ExchangeName, _queueConfiguration.RoutingKey); }
public ValuesController(ILogger <ValuesController> logger, MyRabbitMQContext context) { _logger = logger; _context = context; }
public QueueService(IRabbitMQContext rabbitMQContext) { this.rabbitMQContext = rabbitMQContext; }