public ReaderSource <T> TaggedEvents(Tag tag)
        {
            if (tag == null)
            {
                throw new ArgumentException("Tag is null");
            }

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

            return(new ReaderSource <T>(_brokerWebServiceUrl, actor));
        }
Exemple #2
0
        public SqlSource <IEventEnvelope> TaggedEvents(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 EventsByTag(_tenant, _namespace, _topic, _selectedColumns, _fromMessageId, _toMessageId, tag, _options, _brokerWebServiceUrl);
            var actor     = _actorSystem.ActorOf(EventsByTagActor.Prop(msg, buffer), actorName);

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