public RabbitMQListener()

in extension/WebJobs.Extensions.RabbitMQ/Trigger/RabbitMQListener.cs [43:65]


    public RabbitMQListener(
        IModel channel,
        ITriggeredFunctionExecutor executor,
        ILogger logger,
        string functionId,
        string queueName,
        ushort prefetchCount,
        IDrainModeManager drainModeManager)
    {
        this.channel = channel ?? throw new ArgumentNullException(nameof(channel));
        this.executor = executor ?? throw new ArgumentNullException(nameof(executor));
        this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
        this.queueName = !string.IsNullOrWhiteSpace(queueName) ? queueName : throw new ArgumentNullException(nameof(queueName));
        this.prefetchCount = prefetchCount;
        this.drainModeManager = drainModeManager;
        this.listenerCancellationTokenSource = new CancellationTokenSource();

        _ = !string.IsNullOrWhiteSpace(functionId) ? true : throw new ArgumentNullException(nameof(functionId));

        // Do not convert the scale-monitor ID to lower-case string since RabbitMQ queue names are case-sensitive.
        this.Descriptor = new ScaleMonitorDescriptor($"{functionId}-RabbitMQTrigger-{queueName}", functionId);
        this.logDetails = $"function: '{functionId}', queue: '{queueName}'";
    }