/// <summary> /// Initializes a new instance of the <see cref="QueueRpcConfiguration" /> class. /// </summary> /// <param name="transportConfigurationReceive">The transport configuration receive.</param> /// <param name="transportConfigurationSend">The transport configuration send.</param> /// <param name="messageExpirationConfiguration">The message expiration configuration.</param> /// <param name="headers">The headers.</param> public QueueRpcConfiguration(TransportConfigurationReceive transportConfigurationReceive, TransportConfigurationSend transportConfigurationSend, IMessageExpirationConfiguration messageExpirationConfiguration, IHeaders headers) : base(transportConfigurationSend, transportConfigurationReceive, headers) { Guard.NotNull(() => messageExpirationConfiguration, messageExpirationConfiguration); MessageExpiration = messageExpirationConfiguration; }
/// <summary> /// Initializes a new instance of the <see cref="HeartBeatConfiguration" /> class. /// </summary> /// <param name="transportConfiguration">The transport configuration.</param> /// <param name="threadPoolConfiguration">The thread pool configuration.</param> public HeartBeatConfiguration(TransportConfigurationReceive transportConfiguration, IHeartBeatThreadPoolConfiguration threadPoolConfiguration) { Guard.NotNull(() => transportConfiguration, transportConfiguration); Guard.NotNull(() => threadPoolConfiguration, threadPoolConfiguration); _transportConfigurationReceive = transportConfiguration; ThreadPoolConfiguration = threadPoolConfiguration; MonitorTime = TimeSpan.Zero; Time = TimeSpan.Zero; }
/// <summary> /// Initializes a new instance of the <see cref="QueueConfigurationRpc" /> class. /// </summary> /// <param name="transportConfigurationSend">The transport configuration send.</param> /// <param name="transportConfigurationReceive">The transport configuration receive.</param> /// <param name="headerNames">The header names.</param> public QueueConfigurationRpc(TransportConfigurationSend transportConfigurationSend, TransportConfigurationReceive transportConfigurationReceive, IHeaders headerNames) { Guard.NotNull(() => transportConfigurationSend, transportConfigurationSend); Guard.NotNull(() => transportConfigurationReceive, transportConfigurationReceive); Guard.NotNull(() => headerNames, headerNames); TransportConfigurationSend = transportConfigurationSend; TransportConfigurationReceive = transportConfigurationReceive; HeaderNames = headerNames; }
/// <summary> /// Initializes a new instance of the <see cref="QueueConfigurationReceive" /> class. /// </summary> /// <param name="transportConfiguration">The transport configuration.</param> /// <param name="headerNames">The header names.</param> /// <param name="additionalConfiguration">The additional configuration.</param> /// <param name="timeConfiguration">The time configuration.</param> public QueueConfigurationReceive(TransportConfigurationReceive transportConfiguration, IHeaders headerNames, IConfiguration additionalConfiguration, BaseTimeConfiguration timeConfiguration) { Guard.NotNull(() => transportConfiguration, transportConfiguration); Guard.NotNull(() => headerNames, headerNames); Guard.NotNull(() => additionalConfiguration, additionalConfiguration); Guard.NotNull(() => timeConfiguration, timeConfiguration); TransportConfiguration = transportConfiguration; HeaderNames = headerNames; AdditionalConfiguration = additionalConfiguration; TimeConfiguration = timeConfiguration; }
/// <summary> /// Initializes a new instance of the <see cref="QueueConsumerConfiguration" /> class. /// </summary> /// <param name="transportConfiguration">The transport configuration.</param> /// <param name="workerConfiguration">The worker configuration.</param> /// <param name="heartBeatConfiguration">The heart beat configuration.</param> /// <param name="messageExpirationConfiguration">The message expiration configuration.</param> /// <param name="headers">The headers.</param> /// <param name="additionalConfiguration">The additional configuration.</param> /// <param name="timeConfiguration">The time configuration.</param> public QueueConsumerConfiguration(TransportConfigurationReceive transportConfiguration, IWorkerConfiguration workerConfiguration, IHeartBeatConfiguration heartBeatConfiguration, IMessageExpirationConfiguration messageExpirationConfiguration, IHeaders headers, IConfiguration additionalConfiguration, BaseTimeConfiguration timeConfiguration) : base(transportConfiguration, headers, additionalConfiguration, timeConfiguration) { Guard.NotNull(() => workerConfiguration, workerConfiguration); Guard.NotNull(() => heartBeatConfiguration, heartBeatConfiguration); Guard.NotNull(() => messageExpirationConfiguration, messageExpirationConfiguration); Worker = workerConfiguration; HeartBeat = heartBeatConfiguration; MessageExpiration = messageExpirationConfiguration; _routes = new List<string>(); }
/// <summary> /// Initializes a new instance of the <see cref="QueueConsumerConfiguration" /> class. /// </summary> /// <param name="transportConfiguration">The transport configuration.</param> /// <param name="workerConfiguration">The worker configuration.</param> /// <param name="heartBeatConfiguration">The heart beat configuration.</param> /// <param name="messageExpirationConfiguration">The message expiration configuration.</param> /// <param name="headers">The headers.</param> /// <param name="additionalConfiguration">The additional configuration.</param> /// <param name="timeConfiguration">The time configuration.</param> public QueueConsumerConfiguration(TransportConfigurationReceive transportConfiguration, IWorkerConfiguration workerConfiguration, IHeartBeatConfiguration heartBeatConfiguration, IMessageExpirationConfiguration messageExpirationConfiguration, IHeaders headers, IConfiguration additionalConfiguration, BaseTimeConfiguration timeConfiguration) : base(transportConfiguration, headers, additionalConfiguration, timeConfiguration) { Guard.NotNull(() => workerConfiguration, workerConfiguration); Guard.NotNull(() => heartBeatConfiguration, heartBeatConfiguration); Guard.NotNull(() => messageExpirationConfiguration, messageExpirationConfiguration); Worker = workerConfiguration; HeartBeat = heartBeatConfiguration; MessageExpiration = messageExpirationConfiguration; Routes = new List <string>(); }
/// <summary> /// Initializes a new instance of the <see cref="WorkerNotification" /> class. /// </summary> /// <param name="headerNames">The header names.</param> /// <param name="cancelWork">The cancel work.</param> /// <param name="configuration">The configuration.</param> /// <param name="log">The log.</param> /// <param name="metrics">The metrics factory.</param> public WorkerNotification(IHeaders headerNames, IQueueCancelWork cancelWork, TransportConfigurationReceive configuration, ILogFactory log, IMetrics metrics) { Guard.NotNull(() => headerNames, headerNames); Guard.NotNull(() => cancelWork, cancelWork); Guard.NotNull(() => configuration, configuration); Guard.NotNull(() => log, log); Guard.NotNull(() => metrics, metrics); HeaderNames = headerNames; WorkerStopping = cancelWork; TransportSupportsRollback = configuration.MessageRollbackSupported; Log = log.Create(); Metrics = metrics; }
/// <summary> /// Initializes a new instance of the <see cref="MessageExpirationConfiguration" /> class. /// </summary> /// <param name="transportConfiguration">The transport configuration.</param> public MessageExpirationConfiguration(TransportConfigurationReceive transportConfiguration) { Guard.NotNull(() => transportConfiguration, transportConfiguration); _transportConfigurationReceive = transportConfiguration; }