public ErrorMessageEventArgs(SSSBMessage message, BaseSSSBService svc, Exception processingException, CancellationToken cancellation) { this._message = message; this._service = svc; this._processingException = processingException; this._cancellation = cancellation; }
public ServiceMessageEventArgs(SSSBMessage message, BaseSSSBService svc, CancellationToken cancellation) { _message = message; _service = svc; _cancellation = cancellation; _endConversationAfterProcessing = false; _rollbackQue = false; _ex = null; _taskID = -1; }
public Lazy <BaseTasksCoordinator> GetTaskCoordinator(BaseSSSBService <TDispatcher, TMessageReaderFactory> service) { if (this._tasksCoordinator == null) { this._tasksCoordinator = new Lazy <BaseTasksCoordinator>(() => { return(new SSSBTasksCoordinator(LoggerFactory, GetMessageReaderFactory(service).Value, service.MaxReadersCount, service.IsQueueActivationEnabled, service.MaxReadParallelism)); }, true); } return(this._tasksCoordinator); }
public Lazy <ISSSBMessageDispatcher> GetMessageDispatcher(BaseSSSBService <TDispatcher, TMessageReaderFactory> service) { if (this._messageDispatcher == null) { this._messageDispatcher = new Lazy <ISSSBMessageDispatcher>(() => { return(ActivatorUtilities.CreateInstance <TDispatcher>(services, new object[] { service })); }, true); } return(this._messageDispatcher); }
private static void Start() { svc = new BaseSSSBService("test", 4); Message someItem; while (!BaseSSSBService.ProcessedMessages.IsEmpty) { BaseSSSBService.ProcessedMessages.TryTake(out someItem); } svc.Start(); var producerTask = QueueData(); Console.WriteLine(string.Format("messages processed: {0}", BaseSSSBService.ProcessedMessages.Count)); Console.WriteLine(string.Format("messages in queue: {0}", TestMessageProducer.MessageQueue.Count)); svc.StartActivator(500); var stopTask = Stop(30); Console.ReadLine(); svc.Stop(); }