public FileDecompressor(IQueueReader queueReader, IQueueWriter queueWriter) { _queueReader = queueReader; _queueWriter = queueWriter; _fileProcessData = FileProcessData.Instance; }
public StreamingTimerService(IQueueWriter target, IStreamingContainer storage, IEnvelopeStreamer streamer) { _target = target; _storage = storage; _streamer = streamer; _suffix = Guid.NewGuid().ToString().Substring(0, 4); }
public GZipProcessor(IQueueReader queueReader, IQueueWriter queueWriter, IGZipProgress gZipProgress, IValidator validator) { _queueReader = queueReader; _queueWriter = queueWriter; _gZipProgress = gZipProgress; _validator = validator; }
static void Main(string[] args) { var services = new ServiceCollection(); ConfigureServices(services); IQueueReader reader = null; IQueueWriter writer = null; using (ServiceProvider serviceProvider = services.BuildServiceProvider()) { writer = serviceProvider.GetService <IQueueWriter>(); reader = serviceProvider.GetService <IQueueReader>(); } var putMsg = new QueueMessage() { CorrelationId = Guid.NewGuid().ToString(), Data = "This is a message", QueueName = "DEV.QUEUE.1" }; writer.Enqueue(putMsg); var getMsg = reader.Dequque(); Console.WriteLine(getMsg.Data); }
// ReSharper disable InconsistentNaming static void TestConfiguration(IQueueWriter sender, CqrsEngineBuilder builder) { int i = 0; using (var t = new CancellationTokenSource()) using (TestObserver.When <MessageAcked>(ea => { if (ea.Context.QueueName != "do") { return; } if (i++ >= 5) { t.Cancel(); } })) using (var engine = builder.Build()) { engine.Start(t.Token); sender.PutMessage(new byte[1]); if (!t.Token.WaitHandle.WaitOne(5000)) { t.Cancel(); } Assert.IsTrue(t.IsCancellationRequested); } }
public static GZipStrategy CompressorFactory(IQueueReader queueReader, IQueueWriter queueWriter, IGZipProgress gZipProgress) { var fileCompressor = new FileCompressor(queueReader, queueWriter); var fileReader = new FileReaderForCompress(queueReader, gZipProgress); var fileWriter = new FileWriterForCompress(queueWriter, gZipProgress); return(new GZipStrategy(fileCompressor, fileReader, fileWriter)); }
public AggregateFactory(ITapeStorageFactory factory, IEnvelopeStreamer streamer, IQueueWriter writer, NuclearStorage storage, IIdentityGenerator generator) { _factory = factory; _streamer = streamer; _writer = writer; _storage = storage; _generator = generator; }
internal MessageSender(IQueueWriter writer, QueueMessageSerializer serializer) { if (writer == null) throw new ArgumentNullException("writer"); if (serializer == null) throw new ArgumentNullException("serializer"); _writer = writer; _serializer = serializer; }
public MessageSender(IQueueWriter[] queues, Func<string> idGenerator) { m_queues = queues; m_idGenerator = idGenerator; if (queues.Length == 0) throw new InvalidOperationException("There should be at least one queue"); }
public SampleSaga(ILog <SampleSaga> log, IExampleDataAccess dataAccess, IQueueWriter queueWriter) { _log = log; _dataAccess = dataAccess; _queueWriter = queueWriter; }
public DefaultMessageSender(IQueueWriter[] queues, ISystemObserver observer, Func<string> idGenerator) { _queues = queues; _observer = observer; _idGenerator = idGenerator; if (queues.Length == 0) throw new InvalidOperationException("There should be at least one queue"); }
public SampleDistributedTaskHandler( ILog <SampleDistributedTaskHandler> log, IExampleDataAccess dataAccess, IQueueWriter queueWriter) { _log = log; _dataAccess = dataAccess; _queueWriter = queueWriter; }
public SimpleMessageSender(IEnvelopeStreamer streamer, IQueueWriter[] queues, Func<string> idGenerator = null) { _queues = queues; _idGenerator = idGenerator ?? (() =>Guid.NewGuid().ToString()); _streamer = streamer; if (queues.Length == 0) throw new InvalidOperationException("There should be at least one queue"); }
public ServiceManager(IQueueWriter queueWriter, KseConfiguration configuration, ILogger <ServiceManager> logger) { this.queueWriter = queueWriter; this.configuration = configuration; if (this.configuration == null) { this.configuration = new KseConfiguration(); } this.logger = logger; incomingCallMetrics = new ConcurrentBag <IncomingCallMetric>(); outgoingCallMetrics = new ConcurrentBag <OutgoingCallMetric>(); }
public EventStoreToQueueDistributor( string queueName, IQueueFactory queueFactory, IEventStore eventStore, IDocumentStore projectionStore, ISerializer serializer) { _markerReader = projectionStore.GetReader<string, EventStoreMarker>(); _markerWriter = projectionStore.GetWriter<string, EventStoreMarker>(); _queueName = queueName; _eventStore = eventStore; _queueWriter = queueFactory.CreateWriter(queueName); _serializer = new QueueMessageSerializer(serializer); }
// ReSharper disable InconsistentNaming static void TestConfiguration(IQueueWriter sender, RawEngineBuilder builder) { int i = 0; using (var t = new CancellationTokenSource()) using (TestObserver.When<MessageAcked>(ea => { if (ea.Context.QueueName != "do") return; if (i++ >= 5) t.Cancel(); })) using (var engine = builder.Build()) { engine.Start(t.Token); sender.PutMessage(new byte[1]); if (!t.Token.WaitHandle.WaitOne(5000)) { t.Cancel(); } Assert.IsTrue(t.IsCancellationRequested); } }
public SendStartupMessage(IQueueWriter queueWriter, IBusDataAccess busDataAccess) { _queueWriter = queueWriter; _dataAccess = busDataAccess; }
public BrokerControllerCloudQueueClient(IQueueListener <CloudQueueResponseDto> listener, IQueueWriter <CloudQueueCmdDto> writer) : base(listener, writer) { this.RegisterResponseTypes(); }
internal BrokerLauncherCloudQueueWatcher(IBrokerLauncher instance, IQueueListener <CloudQueueCmdDto> listener, IQueueWriter <CloudQueueResponseDto> writer) { this.instance = instance; this.QueueListener = listener; this.QueueWriter = writer; this.QueueListener.MessageReceivedCallback = this.InvokeInstanceMethodFromCmdObj; this.RegisterCmdDelegates(); }
protected CloudQueueClientBase(IQueueListener <CloudQueueResponseDto> listener, IQueueWriter <CloudQueueCmdDto> writer) : this() { this.Listener = listener; this.Writer = writer; this.Listener.MessageReceivedCallback = this.ReceiveResponse; }
public BusClient(IQueueWriter commandWriter, IQueueWriter eventWriter) { _commandWriter = commandWriter; _eventWriter = eventWriter; }
public MessageSender(IQueueWriter[] queues) : this(queues, () => Guid.NewGuid().ToString()) { }
public MessageSender(IEnvelopeStreamer streamer, IQueueWriter queue) { _queue = queue; _streamer = streamer; }
public LegacyTapeStreamEventStore(ITapeContainer factory, IEnvelopeStreamer streamer, IQueueWriter writer) { _factory = factory; _streamer = streamer; _writer = writer; }
public MouseEventsRequestHandler(IQueueWriter writer, IDataSerializer serializer, IEnvelopeStreamer streamer) { _writer = writer; _serializer = serializer; _streamer = streamer; }
public MyAnonymousCommandSender(IQueueWriter writer, IDataSerializer serializer, IEnvelopeStreamer streamer) { _writer = writer; _serializer = serializer; _streamer = streamer; }
public RentalOfferController(IAudit audit, IQueueWriter queueWriter) { _audit = audit; _queueWriter = queueWriter; }
public WebEndpoint(IQueueWriter queueWriter) { m_queueWriter = queueWriter; }
public TasksFactory(IQueueWriter <T> queueWriter) { this.queueWriter = queueWriter; }
public StartMatchHandler(IQueueWriter <PerformAppend> queueWriter, DataUnitOfWork provider) { _queueWriter = queueWriter; _provider = provider; }
public FileWriterForCompress(IQueueWriter queueWriter, IGZipProgress gZipProgress) { _queueWriter = queueWriter; _gZipProgress = gZipProgress; _fileProcessData = FileProcessData.Instance; }
public WebEndpoint(NuclearStorage store, IEnvelopeStreamer streamer, IQueueWriter writer) { _store = store; _streamer = streamer; _writer = writer; }
/// <summary> /// Writes a message to a queue /// </summary> public static Task WriteMessage <T>(this IQueueWriter writer, string queueName, T message, DateTime?NotBefore = null) { return(writer.WriteMessage(queueName, typeof(T), message, NotBefore)); }
public DefaultMessageSender(IQueueWriter queueWriter) { _queueWriter = queueWriter; }
public AggregateFactory(ITapeStorageFactory factory, IEnvelopeStreamer streamer, IQueueWriter writer) { _factory = factory; _streamer = streamer; _writer = writer; }
public BrokerWorkerControllerQueueWatcher(IController instance, IQueueListener <CloudQueueCmdDto> listener, IQueueWriter <CloudQueueResponseDto> writer) : base(listener, writer) { this.instance = instance; this.RegisterCmdDelegates(); }
public MessageSender(IQueueWriter writer, ISerializer serializer) : this(writer, new QueueMessageSerializer(serializer)) { }
protected CloudQueueWatcherBase(IQueueListener <CloudQueueCmdDto> listener, IQueueWriter <CloudQueueResponseDto> writer) { this.QueueListener = listener; this.QueueWriter = writer; this.QueueListener.MessageReceivedCallback = this.InvokeInstanceMethodFromCmdObj; }