public ChatHub(string botName, IMessageStore messageStore, IUserStore userStore, IEnumerable<ICommandProcessor> commandProcessors, IEnumerable<IContentProvider> contentProviders) { if (string.IsNullOrWhiteSpace(botName)) { throw new ArgumentNullException("botName"); } if (messageStore == null) { throw new ArgumentNullException("messageStore"); } if (userStore == null) { throw new ArgumentNullException("userStore"); } if (commandProcessors == null) { throw new ArgumentNullException("commandProcessors"); } if (contentProviders == null) { throw new ArgumentNullException("contentProviders"); } ChatHubConfiguration.BotName = botName; MessageStore = messageStore; UserStore = userStore; CommandProcessors = commandProcessors; CommandProcessorDescriptions = CommandProcessors.Select(p => new CommandDescription() { Description = p.Description, Name = p.Name, Usage = p.Usage }).OrderBy(d => d.Name) as IEnumerable<CommandDescription>; ContentProviders = contentProviders; ContentProviderDescriptions = ContentProviders.Select(p => new ContentProviderDescription() { Description = p.Description, Name = p.Name, }).OrderBy(d => d.Name) as IEnumerable<ContentProviderDescription>; }
public MessageService(IMessageStore messageStore, IOffsetManager offsetManager, IScheduleService scheduleService) { _messageStore = messageStore; _offsetManager = offsetManager; _scheduleService = scheduleService; _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(GetType().FullName); }
public SendMessageRequestHandler() { _suspendedPullRequestManager = ObjectContainer.Resolve<SuspendedPullRequestManager>(); _messageStore = ObjectContainer.Resolve<IMessageStore>(); _queueService = ObjectContainer.Resolve<IQueueStore>(); _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(GetType().FullName); }
public MessageService(IQueueService queueService, IMessageStore messageStore, IOffsetManager offsetManager) { _queueService = queueService; _messageStore = messageStore; _offsetManager = offsetManager; _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(GetType().FullName); }
/// <summary> /// Initializes a new instance of the <see cref = "StompQueue" /> class. /// </summary> /// <param name = "address">The address.</param> /// <param name = "store">The message store.</param> public StompQueue(string address, IMessageStore store) { if (address == null) throw new ArgumentNullException("address"); if (!address.StartsWith("/")) address = string.Format("/{0}", address); Address = address; Store = store; }
protected PersistentConnection(Signaler signaler, IMessageStore store, IJsonStringifier jsonStringifier) { _signaler = signaler; _store = store; _jsonStringifier = jsonStringifier; }
public Smtp4devEngine(ISettingsStore settingsStore, IMessageStore messageStore) { _settingsStore = settingsStore; _settingsStore.Saved += OnSettingsChanged; _messageStore = messageStore; TryStart(); }
public DefaultQueueStore(IMessageStore messageStore, IConsumeOffsetStore consumeOffsetStore, IScheduleService scheduleService, ILoggerFactory loggerFactory) { _queueDict = new ConcurrentDictionary<string, Queue>(); _messageStore = messageStore; _consumeOffsetStore = consumeOffsetStore; _scheduleService = scheduleService; _logger = loggerFactory.Create(GetType().FullName); }
public DefaultChunkReadStatisticService(IMessageStore messageStore, IScheduleService scheduleService, ILoggerFactory loggerFactory) { _messageStore = messageStore; _scheduleService = scheduleService; _logger = loggerFactory.Create("ChunkRead"); _fileReadDict = new ConcurrentDictionary<int, CountInfo>(); _unmanagedReadDict = new ConcurrentDictionary<int, CountInfo>(); _cachedReadDict = new ConcurrentDictionary<int, CountInfo>(); }
public FileMessageStoreTransaction(IMessageStore messageStore, DirectoryInfo rootDirectory, DirectoryInfo dataDirectory, DirectoryInfo metaDirectory) { _messageStore = messageStore; _rootDirectory = rootDirectory; _dataDirectory = dataDirectory; _metaDirectory = metaDirectory; TransactionId = Guid.NewGuid(); _enlistedForRemoval = new List<SimpleQueueMessage>(); }
public PullMessageRequestHandler() { _consumerManager = ObjectContainer.Resolve<ConsumerManager>(); _suspendedPullRequestManager = ObjectContainer.Resolve<SuspendedPullRequestManager>(); _messageStore = ObjectContainer.Resolve<IMessageStore>(); _queueStore = ObjectContainer.Resolve<IQueueStore>(); _offsetStore = ObjectContainer.Resolve<IConsumeOffsetStore>(); _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(GetType().FullName); }
public QueueService(IQueueStore queueStore, IMessageStore messageStore, IOffsetManager offsetManager, IScheduleService scheduleService, ILoggerFactory loggerFactory) { _queueDict = new ConcurrentDictionary<string, Queue>(); _queueStore = queueStore; _messageStore = messageStore; _offsetManager = offsetManager; _scheduleService = scheduleService; _logger = loggerFactory.Create(GetType().FullName); }
protected PersistentConnection(Signaler signaler, IClientIdFactory clientIdFactory, IMessageStore store, IJsonSerializer jsonSerializer) { _signaler = signaler; _clientIdFactory = clientIdFactory; _store = store; _jsonSerializer = jsonSerializer; }
public void createNotificationForTask(int TaskId, string cfgSQLConnectionString) { this.cfgSQLConnectionString = cfgSQLConnectionString; configStore = StoreHandler.getConfigStore(cfgSQLConnectionString); baseURL = configStore.getString(BaseURL); templatepath = configStore.getString(Email_NotificationTemplate); taskStore = StoreHandler.getTaskStore(cfgSQLConnectionString); T_Task task = taskStore.getTaskById(TaskId); helper = new MailBodyHelper(); processStore = StoreHandler.getProcessStore(cfgSQLConnectionString); instance = processStore.getWorkflowInstance(task.WFId); mail = new SmtpUtils(configStore); if (task.Type.Equals("F") || task.Type.Equals("S")) { if (configStore.getBool(Email_Notifications_Tasks)) { string content = helper.getStateBody(task, baseURL, templatepath); List<string> recipients = new List<string>(); if (String.IsNullOrEmpty(instance.Owner)) { var subject = processStore.getProcessSubjectForWFId(task.WFId); userStore = StoreHandler.getUserStore(cfgSQLConnectionString); recipients.AddRange(userStore.getUsernamesForRole(subject.U_Role_Id)); } else { recipients.Add(instance.Owner); } foreach (string user in recipients) { mail.sendMail(user, "InFlow: " + task.Name + " #" + task.Id, content); } } } if (task.Type.Equals("R")) { if (configStore.getBool(Email_Notifications_Messages)) { messageStore = StoreHandler.getMessageStore(cfgSQLConnectionString); var messages = messageStore.getMessagesForReceiveStateTask(task.WFId, task.getTaskPropertiesAsListOfString()); foreach (var i in messages) { createReceiveNotification(i, task); } } } }
public InnerSimpleQueue(BlockingCollection<SimpleQueueMessage> queue, string directoryPath) { if (queue == null) throw new ArgumentNullException("queue"); Queue = queue; DirectoryPath = directoryPath; _messageStore = new FileMessageStore(DirectoryPath); _directory = new DirectoryInfo(DirectoryPath); MakeSureQueueExsists(); }
protected PersistentConnection(Signaler signaler, IConnectionIdFactory connectionIdFactory, IMessageStore store, IJsonSerializer jsonSerializer, ITransportManager transportManager) { _signaler = signaler; _connectionIdFactory = connectionIdFactory; _store = store; _jsonSerializer = jsonSerializer; _transportManager = transportManager; }
public Connection(IMessageStore store, Signaler signaler, string baseSignal, string clientId, IEnumerable <string> signals) : this(store, signaler, baseSignal, clientId, signals, Enumerable.Empty <string>()) { }
public void AddMessageStore(IMessageStore store, string key) { if (String.IsNullOrEmpty(key)) { throw new ArgumentNullException("key"); } if (MessageStores == null) { MessageStores = new Dictionary<string, IMessageStore>(); } MessageStores.Add(key, store); }
public SendMessageRequestHandler(BrokerController brokerController) { _brokerController = brokerController; _suspendedPullRequestManager = IocManager.Instance.Resolve <SuspendedPullRequestManager>(); _messageStore = IocManager.Instance.Resolve <IMessageStore>(); _queueStore = IocManager.Instance.Resolve <IQueueStore>(); _notifyWhenMessageArrived = _brokerController.Setting.NotifyWhenMessageArrived; _logger = IocManager.Instance.Resolve <ILoggerFactory>().Create(GetType().FullName); _sendRTLogger = IocManager.Instance.Resolve <ILoggerFactory>().Create("SendRT"); var messageWriteQueueThreshold = brokerController.Setting.MessageWriteQueueThreshold; _bufferQueue = new BufferQueue <StoreContext>("QueueBufferQueue", messageWriteQueueThreshold, OnQueueMessageCompleted, _logger); }
public void AddMessageStore(IMessageStore store, string key) { if (String.IsNullOrEmpty(key)) { throw new ArgumentNullException("key"); } if (MessageStores == null) { MessageStores = new Dictionary <string, IMessageStore>(); } MessageStores.Add(key, store); }
public SendMessageRequestHandler(BrokerController brokerController) { _brokerController = brokerController; _suspendedPullRequestManager = ObjectContainer.Resolve<SuspendedPullRequestManager>(); _messageStore = ObjectContainer.Resolve<IMessageStore>(); _queueStore = ObjectContainer.Resolve<IQueueStore>(); _tpsStatisticService = ObjectContainer.Resolve<ITpsStatisticService>(); _notifyWhenMessageArrived = _brokerController.Setting.NotifyWhenMessageArrived; _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(GetType().FullName); _sendRTLogger = ObjectContainer.Resolve<ILoggerFactory>().Create("SendRT"); var messageWriteQueueThreshold = brokerController.Setting.MessageWriteQueueThreshold; _bufferQueue = new BufferQueue<StoreContext>("QueueBufferQueue", messageWriteQueueThreshold, OnQueueMessageCompleted, _logger); }
internal EndSessionResult( EndSessionValidationResult result, IdentityServerOptions options, ISystemClock clock, IServerUrls urls, IMessageStore <LogoutMessage> logoutMessageStore) : this(result) { _options = options; _clock = clock; _urls = urls; _logoutMessageStore = logoutMessageStore; }
internal AuthorizeResult( AuthorizeResponse response, IdentityServerOptions options, IUserSession userSession, IMessageStore <ErrorMessage> errorMessageStore, ISystemClock clock) : this(response) { _options = options; _userSession = userSession; _errorMessageStore = errorMessageStore; _clock = clock; }
public MessagesApi(IMessageStore messageManager, IInternalMessageMediator internalMessageManager, IPeerCommunicationService peerCommunicationService, ILogger <MessagesApi> logger, IMapper mapper ) { _messageStore = messageManager; _internalMessageManager = internalMessageManager; _peerCommunicationService = peerCommunicationService; _logger = logger; _mapper = mapper; }
public AppUnitOfWork(IEventBus eventBus, ILoggerFactory loggerFactory, IMessagePublisher eventPublisher, IMessageQueueClient messageQueueClient, IMessageStore messageStore) : base(eventBus, loggerFactory) { _messageStore = messageStore; _messagePublisher = eventPublisher; _messageQueueClient = messageQueueClient; _eventMessageStates = new List <MessageState>(); _anywayPublishEventMessageStates = new List <MessageState>(); }
internal EndSessionCallbackResult( EndSessionCallbackValidationResult result, ISessionIdService sessionId, IClientSessionService clientList, IMessageStore <LogoutMessage> logoutMessageStore, IdentityServerOptions options) : this(result) { _sessionId = sessionId; _clientList = clientList; _logoutMessageStore = logoutMessageStore; _options = options; }
private void Initialize() { messageStore = new MessageStoreImpl.SQLite(Environment.UserName); //messageStore = new MessageStoreImpl.SQL(); //messageStore = new MessageStoreImpl.STSdb(Environment.UserName); messageProvider = new DailyMessageProvider(messageStore); webBrowser.DocumentCompleted += webBrowser_DocumentCompleted; pnWebbrowser.MouseEnter += pnWebbrowser_MouseEnter; loadWorker.DoWork += loadWorker_DoWork; loadWorker.RunWorkerCompleted += loadWorker_RunWorkerCompleted; }
public IncomingMessageProcessor( IMessageStore <TPayloadType, TBody, TMsgCtx> messageStore, IMessageRouter <TPayloadType, TBody, TMsgCtx> messageRouter, IOutgoingConnection <TPayloadType, TBody> outgoingConnection, IMessageResultFactory <TBody> messageResultFactory) { this.buffer = new MpmcRingBuffer <Message <TPayloadType, TBody> >(0x1000); this.outgoingConnection = outgoingConnection; this.messageResultFactory = messageResultFactory; this.messageStore = messageStore; this.messageRouter = messageRouter; this.semaphore = new FastSemaphore(100); }
public async Task CleanupTestCheckpointed() { (IMessageStore messageStore, ICheckpointStore checkpointStore)result = await this.GetMessageStore(20); ICheckpointStore checkpointStore = result.checkpointStore; using (IMessageStore messageStore = result.messageStore) { for (int i = 0; i < 200; i++) { if (i % 2 == 0) { long offset = await messageStore.Add("module1", this.GetMessage(i)); Assert.Equal(i / 2, offset); } else { long offset = await messageStore.Add("module2", this.GetMessage(i)); Assert.Equal(i / 2, offset); } } IMessageIterator module1Iterator = messageStore.GetMessageIterator("module1"); IEnumerable <IMessage> batch = await module1Iterator.GetNext(100); Assert.Equal(100, batch.Count()); IMessageIterator module2Iterator = messageStore.GetMessageIterator("module2"); batch = await module2Iterator.GetNext(100); Assert.Equal(100, batch.Count()); await checkpointStore.SetCheckpointDataAsync("module1", new CheckpointData(198), CancellationToken.None); await checkpointStore.SetCheckpointDataAsync("module2", new CheckpointData(199), CancellationToken.None); await Task.Delay(TimeSpan.FromSeconds(100)); module2Iterator = messageStore.GetMessageIterator("module2"); batch = await module2Iterator.GetNext(100); Assert.Equal(0, batch.Count()); module1Iterator = messageStore.GetMessageIterator("module1"); batch = await module1Iterator.GetNext(100); Assert.Equal(0, batch.Count()); } }
public InnerSimpleQueue(BlockingCollection <SimpleQueueMessage> queue, string directoryPath) { if (queue == null) { throw new ArgumentNullException("queue"); } Queue = queue; DirectoryPath = directoryPath; _messageStore = new FileMessageStore(DirectoryPath); _directory = new DirectoryInfo(DirectoryPath); MakeSureQueueExsists(); }
public MachineInterfaceConnectorMessageSession( string requestId, TPayload payload, ITransactionContext transactionContext, IMessageSession rootSession, IMessageStore messageStore) { Payload = payload; TransactionContext = transactionContext; this.requestId = requestId; this.rootSession = rootSession; this.messageStore = messageStore; }
/// <summary> /// Initializes a new instance of the <see cref = "StompQueue" /> class. /// </summary> /// <param name = "address">The address.</param> /// <param name = "store">The message store.</param> public StompQueue(string address, IMessageStore store) { if (address == null) { throw new ArgumentNullException("address"); } if (!address.StartsWith("/")) { address = string.Format("/{0}", address); } Address = address; Store = store; }
public Connection(IMessageStore store, Signaler signaler, string baseSignal, string clientId, IEnumerable <string> signals, IEnumerable <string> groups) { _store = store; _signaler = signaler; _baseSignal = baseSignal; _clientId = clientId; _signals = new HashSet <string>(signals); _groups = new HashSet <string>(groups); }
/// <summary> /// Parameterized Constructor. /// </summary> public MessageProcessor(string messageTypeName, IMessageQueue[] queues, IMessageExecutor <TMessage> messageExecutor, IMessageStore messageStore, ITextSerializer serializer) { this._messageTypeName = messageTypeName; this._messageExecutor = messageExecutor; this._queuesCount = queues.Length; this._queues = queues; this._messageStore = messageStore; this._serializer = serializer; this._taskScheduler = new LimitedConcurrencyLevelTaskScheduler(_queuesCount); }
public StoringAsyncEndpointExecutor(Endpoint endpoint, ICheckpointer checkpointer, EndpointExecutorConfig config, AsyncEndpointExecutorOptions options, IMessageStore messageStore) { Preconditions.CheckNotNull(endpoint); Preconditions.CheckNotNull(config); this.checkpointer = Preconditions.CheckNotNull(checkpointer); this.options = Preconditions.CheckNotNull(options); this.machine = new EndpointExecutorFsm(endpoint, checkpointer, config); this.messageStore = messageStore; this.sendMessageTask = Task.Run(this.SendMessagesPump); }
public MessageHandler(IConnection connection, IConnectionMultiplexer connectionMultiplexer, IHttpClientFactory httpClientFactory, IMessageStore messageStore, ILogger <MessageHandler> logger) { _connection = connection; _connectionMultiplexer = connectionMultiplexer; _httpClientFactory = httpClientFactory; _messageStore = messageStore; _logger = logger; Start(); }
public SessionsController(ILogger <SessionsController> logger, IDataEncryptor dataEncryptor, IDateTimeProvider dateTimeProvider, IMessageStore messageStore, IModelConverter modelConverter, ISessionStore sessionStore) { this._logger = logger; this._dataEncryptor = dataEncryptor; this._dateTimeProvider = dateTimeProvider; this._messageStore = messageStore; this._modelConverter = modelConverter; this._sessionStore = sessionStore; }
public static ExactlyOnceEntitiesSettings <T> UseExactlyOnce <T>(this EndpointConfiguration config, IApplicationStateStore <T> applicationStateStore, IMessageStore messageStore) { if (!config.GetSettings().TryGet <ExactlyOnceEntitiesSettings <T> >("ExactlyOnce.Settings", out var settings)) { settings = new ExactlyOnceEntitiesSettings <T>(applicationStateStore); config.GetSettings().Set("ExactlyOnce.Settings", settings); } settings.MessageStore = messageStore; config.GetSettings().EnableFeatureByDefault(typeof(ExactlyOnceFeature)); return(settings); }
public DriverCatalog(IMessageStore messageStore, IMessageChannel messageChannel) { this.MessageStores = new List<IMessageStore>(); this.MessageChannels = new List<IMessageChannel>(); if (messageStore != null) { this.MessageStores.Add(messageStore); } if (messageChannel != null) { this.MessageChannels.Add(messageChannel); } InitializeComposition(); }
public UnitOfWork(IEventBus eventBus, ILoggerFactory loggerFactory, IMessagePublisher eventPublisher, IMessageQueueClient messageQueueClient, IMessageStore messageStore, IMessageContext messageContext) : base(eventBus, loggerFactory) { MessageStore = messageStore; _messageContext = messageContext; MessagePublisher = eventPublisher; MessageQueueClient = messageQueueClient; EventMessageStates = new List <MessageState>(); AnywayPublishEventMessageStates = new List <MessageState>(); }
public AuthorizeEndpoint( IEventService events, ILogger <AuthorizeEndpoint> logger, IAuthorizeRequestValidator validator, IAuthorizeInteractionResponseGenerator interactionGenerator, IMessageStore <ConsentResponse> consentResponseStore, IAuthorizeResponseGenerator authorizeResponseGenerator) { _events = events; _logger = logger; _validator = validator; _interactionGenerator = interactionGenerator; _consentResponseStore = consentResponseStore; _authorizeResponseGenerator = authorizeResponseGenerator; }
public OCHMessage(IMessageStore messageStore, INotify notify) { if (messageStore == null) { throw new ArgumentNullException("IMessageStore is null"); } if (notify == null) { throw new ArgumentNullException("INotify is null"); } this.messageStore = messageStore; this.notify = notify; }
public Application( IMessageQueue messageQueue, IMessagePump messagePump, IMessageStore messageStore) { _messageQueue = messageQueue; _messagePump = messagePump; _messageStore = messageStore; _messageHandlers = new ComputedDictionary <Guid, IMessageHandler>( () => new List <IMessageHandler> { _board }.Union(_board.Cards) .ToDictionary(h => h.GetObjectId())); }
private BrokerController(BrokerSetting setting) { Setting = setting ?? new BrokerSetting(); _consumerManager = ObjectContainer.Resolve<ConsumerManager>(); _messageStore = ObjectContainer.Resolve<IMessageStore>(); _offsetManager = ObjectContainer.Resolve<IOffsetManager>(); _queueService = ObjectContainer.Resolve<IQueueService>(); _messageService = ObjectContainer.Resolve<IMessageService>(); _suspendedPullRequestManager = ObjectContainer.Resolve<SuspendedPullRequestManager>(); _producerSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.ProducerRemotingServer", Setting.ProducerIPEndPoint); _consumerSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.ConsumerRemotingServer", Setting.ConsumerIPEndPoint, this); _adminSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.AdminRemotingServer", Setting.AdminIPEndPoint); _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(GetType().FullName); RegisterRequestHandlers(); }
private BrokerController(BrokerSetting setting) { Setting = setting ?? new BrokerSetting(); _consumerManager = ObjectContainer.Resolve <ConsumerManager>(); _messageStore = ObjectContainer.Resolve <IMessageStore>(); _offsetManager = ObjectContainer.Resolve <IOffsetManager>(); _queueService = ObjectContainer.Resolve <IQueueService>(); _messageService = ObjectContainer.Resolve <IMessageService>(); _suspendedPullRequestManager = ObjectContainer.Resolve <SuspendedPullRequestManager>(); _producerSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.ProducerRemotingServer", Setting.ProducerIPEndPoint); _consumerSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.ConsumerRemotingServer", Setting.ConsumerIPEndPoint, this); _adminSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.AdminRemotingServer", Setting.AdminIPEndPoint); _logger = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName); RegisterRequestHandlers(); }
public Connection(IMessageStore store, IJsonSerializer jsonSerializer, Signaler signaler, string baseSignal, string connectionId, IEnumerable <string> signals) : this(store, jsonSerializer, signaler, baseSignal, connectionId, signals, Enumerable.Empty <string>()) { }
public LyncHMessageRecorder(IMessageStore messageStore) { if (messageStore == null) { throw new ArgumentNullException("IMessageStore is null"); } //if (notify == null) //{ // throw new ArgumentNullException("INotify is null"); //} this.messageStore = messageStore; //this.notify = notify; }
public StoringAsyncEndpointExecutor( Endpoint endpoint, ICheckpointerFactory checkpointerFactory, EndpointExecutorConfig config, AsyncEndpointExecutorOptions options, IMessageStore messageStore) { this.Endpoint = Preconditions.CheckNotNull(endpoint); this.checkpointerFactory = Preconditions.CheckNotNull(checkpointerFactory); this.config = Preconditions.CheckNotNull(config); this.options = Preconditions.CheckNotNull(options); this.messageStore = messageStore; this.sendMessageTask = Task.Run(this.SendMessagesPump); this.prioritiesToFsms = new AtomicReference <ImmutableDictionary <uint, EndpointExecutorFsm> >(ImmutableDictionary <uint, EndpointExecutorFsm> .Empty); }
public AuthorizeEndpointResultFactory( ILogger <AuthorizeEndpointResultFactory> logger, IdentityServerContext context, IAuthorizeResponseGenerator responseGenerator, ILocalizationService localizationService, IMessageStore <ErrorMessage> errorMessageStore, ClientListCookie clientListCookie) { _logger = logger; _context = context; _responseGenerator = responseGenerator; _localizationService = localizationService; _errorMessageStore = errorMessageStore; _clientListCookie = clientListCookie; }
public ReceiverTests(SharedTestDirectory testDirectory) { var port = PortFinder.FindPort(); //to make it possible to run in parallel _endpoint = new IPEndPoint(IPAddress.Loopback, port); _logger = new RecordingLogger(); _store = new LmdbMessageStore(testDirectory.CreateNewDirectoryForTest()); _store.CreateQueue("test"); _sendingStore = new LmdbMessageStore(testDirectory.CreateNewDirectoryForTest()); _sendingStore.CreateQueue("test"); _sender = new SendingProtocol(_sendingStore, _logger); var protocol = new ReceivingProtocol(_store, _logger); _receiver = new Receiver(_endpoint, protocol, new NoSecurity(), _logger); }
public HubDispatcher(IHubFactory hubFactory, IMessageStore store, Signaler signaler, IActionResolver actionResolver, IJavaScriptProxyGenerator proxyGenerator, IJsonStringifier jsonStringifier, string url) : base(signaler, store, jsonStringifier) { _hubFactory = hubFactory; _store = store; _signaler = signaler; _actionResolver = actionResolver; _proxyGenerator = proxyGenerator; _url = VirtualPathUtility.ToAbsolute(url); }
private void initService() { if (connectionString == null) { connectionString = ConfigurationSettings.AppSettings["repositoryConnectionString"].ToString(); wfmBaseAddress = ConfigurationSettings.AppSettings["wfmBaseAddress"].ToString(); wfmUsername = ConfigurationSettings.AppSettings["wfmUsername"].ToString(); wfmPassword = ConfigurationSettings.AppSettings["wfmPassword"].ToString(); taskStore = StoreHandler.getTaskStore(connectionString); processStore = StoreHandler.getProcessStore(connectionString); userStore = StoreHandler.getUserStore(connectionString); messageStore = StoreHandler.getMessageStore(connectionString); _db = new InFlowDb(); } }
public AuthorizeEndpoint( IEventService events, ILogger<AuthorizeEndpoint> logger, IdentityServerContext context, IAuthorizeRequestValidator validator, IAuthorizeInteractionResponseGenerator interactionGenerator, IAuthorizeEndpointResultFactory resultGenerator, IMessageStore<SignInResponse> signInResponseStore, IMessageStore<ConsentResponse> consentRequestStore) { _events = events; _logger = logger; _context = context; _validator = validator; _interactionGenerator = interactionGenerator; _resultGenerator = resultGenerator; _signInResponseStore = signInResponseStore; _consentResponseStore = consentRequestStore; }
public AuthorizeEndpointResultFactory( ILogger<AuthorizeEndpointResultFactory> logger, IdentityServerContext context, IAuthorizeResponseGenerator responseGenerator, ILocalizationService localizationService, IMessageStore<SignInRequest> signInRequestStore, IMessageStore<ConsentRequest> consentRequestStore, IMessageStore<ErrorMessage> errorMessageStore, ClientListCookie clientListCookie) { _logger = logger; _context = context; _responseGenerator = responseGenerator; _localizationService = localizationService; _signInRequestStore = signInRequestStore; _consentRequestStore = consentRequestStore; _errorMessageStore = errorMessageStore; _clientListCookie = clientListCookie; }
static void InitializeEQueue() { var configuration = ECommonConfiguration .Create() .UseAutofac() .RegisterCommonComponents() .UseLog4Net() .UseJsonNet() .RegisterUnhandledExceptionHandler() .RegisterEQueueComponents(); BrokerController.Create(new BrokerSetting(ConfigurationManager.AppSettings["fileStoreRootPath"], 1024 * 1024 * 1024, enableCache: false)); _messageStore = ObjectContainer.Resolve<IMessageStore>(); _scheduleService = ObjectContainer.Resolve<IScheduleService>(); _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(typeof(Program).Name); _messageStore.Load(); _messageStore.Start(); }
private BrokerController(BrokerSetting setting) { Setting = setting ?? new BrokerSetting(); _consumerManager = ObjectContainer.Resolve<ConsumerManager>(); _messageStore = ObjectContainer.Resolve<IMessageStore>(); _consumeOffsetStore = ObjectContainer.Resolve<IConsumeOffsetStore>(); _queueStore = ObjectContainer.Resolve<IQueueStore>(); _suspendedPullRequestManager = ObjectContainer.Resolve<SuspendedPullRequestManager>(); _chunkReadStatisticService = ObjectContainer.Resolve<IChunkStatisticService>(); _producerSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.ProducerRemotingServer", Setting.ProducerAddress, Setting.SocketSetting); _consumerSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.ConsumerRemotingServer", Setting.ConsumerAddress, Setting.SocketSetting); _adminSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.AdminRemotingServer", Setting.AdminAddress, Setting.SocketSetting); _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(GetType().FullName); _consumerSocketRemotingServer.RegisterConnectionEventListener(new ConsumerConnectionEventListener(this)); RegisterRequestHandlers(); _service = new ConsoleEventHandlerService(); _service.RegisterClosingEventHandler(eventCode => { Shutdown(); }); }
public MessageQueue(string id, IMessageStore store, IMessageChannel channel) { if (string.IsNullOrWhiteSpace(id)) { throw new ArgumentException("id"); } if (store == null) { throw new ArgumentNullException("store"); } if (channel == null) { throw new ArgumentNullException("channel"); } this.Id = id; this.store = store; this.channel = channel; }
public HubDispatcher(IHubFactory hubFactory, IMessageStore store, Signaler signaler, IConnectionIdFactory connectionIdFactory, IActionResolver actionResolver, IJavaScriptProxyGenerator proxyGenerator, IJsonSerializer jsonSerializer, IHubLocator hubLocator, IHubTypeResolver hubTypeResolver, string url) : base(signaler, connectionIdFactory, store, jsonSerializer) { _hubFactory = hubFactory; _store = store; _jsonSerializer = jsonSerializer; _signaler = signaler; _actionResolver = actionResolver; _proxyGenerator = proxyGenerator; _hubLocator = hubLocator; _hubTypeResolver = hubTypeResolver; _url = VirtualPathUtility.ToAbsolute(url); }
public MessageManager(Log log, IMessageStore messageStore) { this.log = log; this.store = messageStore; this.log.SetCategory("Message"); }
private void InitializeMessageStore() { if (catalog != null && catalog.MessageStores != null) { // Try and find a message store that isn't the InMemoryMessageStore. var stores = catalog.MessageStores.Where(x => x.GetType() != typeof(InMemoryMessageStore)); if (stores.Count() == 1) { // If only one message store is present, use it. this.MessageStore = stores.FirstOrDefault(); } else { #if DEBUG // No message store found. Let's default to the InMemoryMessageStore. this.MessageStore = catalog.MessageStores.Where(x => x.GetType() == typeof(InMemoryMessageStore)).FirstOrDefault(); #endif } } if (this.MessageStore == null) { throw new ApplicationException("Unable to load message storage driver"); } }