/// <summary> /// Initializes a new instance of the <see cref="SchedulerMethod"/> class. /// </summary> /// <param name="queue">The queue.</param> /// <param name="messageMethodHandling">The message method handling.</param> public SchedulerMethod(IConsumerQueueScheduler queue, IMessageMethodHandling messageMethodHandling) { Guard.NotNull(() => queue, queue); Guard.NotNull(() => messageMethodHandling, messageMethodHandling); _queue = queue; _messageMethodHandling = messageMethodHandling; }
/// <summary> /// Initializes a new instance of the <see cref="MessageMethodHandlingDecorator" /> class. /// </summary> /// <param name="metrics">The metrics factory.</param> /// <param name="handler">The handler.</param> /// <param name="connectionInformation">The connection information.</param> public MessageMethodHandlingDecorator(IMetrics metrics, IMessageMethodHandling handler, IConnectionInformation connectionInformation) { var name = "MessageMethodHandling"; _runMethodCompiledCodeTimer = metrics.Timer($"{connectionInformation.QueueName}.{name}.HandleCompiledMethodTimer", Units.Calls); _runMethodDynamicCodeTimer = metrics.Timer($"{connectionInformation.QueueName}.{name}.HandleDynamicMethodTimer", Units.Calls); _handler = handler; }
/// <summary> /// Initializes a new instance of the <see cref="MessageMethodHandlingDecorator" /> class. /// </summary> /// <param name="metrics">The metrics factory.</param> /// <param name="handler">The handler.</param> /// <param name="connectionInformation">The connection information.</param> public MessageMethodHandlingDecorator(IMetrics metrics, IMessageMethodHandling handler, IConnectionInformation connectionInformation) { var name = handler.GetType().Name; _runMethodCompiledCodeTimer = metrics.Timer($"{connectionInformation.QueueName}.{name}.HandleCompiledMethodTimer", Units.Calls); _runFunctionCompiledCodeTimer = metrics.Timer($"{connectionInformation.QueueName}.{name}.HandleCompiledFunctionTimer", Units.Calls); _runMethodDynamicCodeTimer = metrics.Timer($"{connectionInformation.QueueName}.{name}.HandleDynamicMethodTimer", Units.Calls); _runFunctionDynamicCodeTimer = metrics.Timer($"{connectionInformation.QueueName}.{name}.HandleDynamicFunctionTimer", Units.Calls); _handler = handler; }
/// <summary> /// Initializes a new instance of the <see cref="ConsumerMethodQueue"/> class. /// </summary> /// <param name="queue">The queue.</param> /// <param name="log">The log.</param> /// <param name="messageMethodHandling">The message method handling.</param> public ConsumerMethodQueue( IConsumerQueue queue, ILogFactory log, IMessageMethodHandling messageMethodHandling) : base(log) { Guard.NotNull(() => queue, queue); Guard.NotNull(() => messageMethodHandling, messageMethodHandling); _queue = queue; _messageMethodHandling = messageMethodHandling; }
/// <summary> /// Initializes a new instance of the <see cref="MessageMethodHandlingDecorator"/> class. /// </summary> /// <param name="handler">The handler.</param> /// <param name="tracer">The tracer.</param> /// <param name="headers">The headers.</param> public MessageMethodHandlingDecorator(IMessageMethodHandling handler, ActivitySource tracer, IStandardHeaders headers) { _handler = handler; _tracer = tracer; _headers = headers; }