Ejemplo n.º 1
0
        public ReaderSource <T> CurrentTaggedEvents(Tag tag)
        {
            if (tag == null)
            {
                throw new ArgumentException("Tag is null");
            }

            var actorName = Regex.Replace(_topic, @"[^\w\d]", "");
            var msg       = new CurrentEventsByTag <T>(_tenant, _namespace, _topic, _fromMessageId, _toMessageId, tag, _brokerWebServiceUrl, _conf.ReaderConfigurationData, _clientConfiguration);
            var actor     = _actorSystem.ActorOf(CurrentEventsByTagActor <T> .Prop(msg, _client, _lookup, _cnxPool, _generator, _schema), actorName);

            return(new ReaderSource <T>(_brokerWebServiceUrl, actor));
        }
Ejemplo n.º 2
0
        public SqlSource <IEventEnvelope> CurrentTaggedEvents(Tag tag)
        {
            if (tag == null)
            {
                throw new ArgumentException("Tag is null");
            }

            var buffer    = new BufferBlock <IEventEnvelope>();
            var actorName = Regex.Replace(_topic, @"[^\w\d]", "");
            var msg       = new CurrentEventsByTag(_tenant, _namespace, _topic, _selectedColumns, _fromMessageId, _toMessageId, tag, _options, _brokerWebServiceUrl);
            var actor     = _actorSystem.ActorOf(CurrentEventsByTagActor.Prop(msg, buffer), actorName);

            return(new SqlSource <IEventEnvelope>(_brokerWebServiceUrl, buffer, actor));
        }