public EventConsumerActor( EventDataFormatter formatter, IEventStore eventStore, IEventConsumerInfoRepository eventConsumerInfoRepository, ISemanticLog log) { Guard.NotNull(log, nameof(log)); Guard.NotNull(formatter, nameof(formatter)); Guard.NotNull(eventStore, nameof(eventStore)); Guard.NotNull(eventConsumerInfoRepository, nameof(eventConsumerInfoRepository)); this.log = log; this.formatter = formatter; this.eventStore = eventStore; this.eventConsumerInfoRepository = eventConsumerInfoRepository; var options = new ExecutionDataflowBlockOptions { MaxMessagesPerTask = -1, MaxDegreeOfParallelism = 1, BoundedCapacity = 10 }; dispatcher = new ActionBlock <object>(OnMessage, options); }
public MyEventConsumerActor( EventDataFormatter formatter, IEventStore eventStore, IEventConsumerInfoRepository eventConsumerInfoRepository, ISemanticLog log) : base(formatter, eventStore, eventConsumerInfoRepository, log) { }
public ContentVersionLoader(IEventStore eventStore, IStreamNameResolver nameResolver, EventDataFormatter formatter) { Guard.NotNull(formatter, nameof(formatter)); Guard.NotNull(eventStore, nameof(eventStore)); Guard.NotNull(nameResolver, nameof(nameResolver)); this.formatter = formatter; this.eventStore = eventStore; this.nameResolver = nameResolver; }
public DefaultDomainObjectRepository(IEventStore eventStore, IStreamNameResolver nameResolver, EventDataFormatter formatter) { Guard.NotNull(formatter, nameof(formatter)); Guard.NotNull(eventStore, nameof(eventStore)); Guard.NotNull(nameResolver, nameof(nameResolver)); this.formatter = formatter; this.eventStore = eventStore; this.nameResolver = nameResolver; }
public override void RunInitialize() { services = Services.Create(); eventConsumer = new MyEventConsumer(NumEvents); eventStore = services.GetRequiredService <IEventStore>(); eventDataFormatter = services.GetRequiredService <EventDataFormatter>(); eventConsumerGrain = services.GetRequiredService <EventConsumerGrain>(); eventConsumerGrain.ActivateAsync(services.GetRequiredService <StateHolder <EventConsumerState> >()).Wait(); eventConsumerGrain.Activate(eventConsumer); }
public EventConsumerGrain( EventDataFormatter formatter, IEventStore eventStore, ISemanticLog log) { Guard.NotNull(log, nameof(log)); Guard.NotNull(formatter, nameof(formatter)); Guard.NotNull(eventStore, nameof(eventStore)); this.log = log; this.formatter = formatter; this.eventStore = eventStore; }
public ParseEventBlock(EventDataFormatter formatter, ISemanticLog log) { this.formatter = formatter; this.log = log; var nullHandler = new ActionBlock <Envelope <IEvent> >(x => { }); transformBlock = new TransformBlock <StoredEvent, Envelope <IEvent> >(x => HandleAsync(x), new ExecutionDataflowBlockOptions { BoundedCapacity = 1 }); transformBlock.LinkTo(nullHandler, x => x == null); }
public EventConsumerActor( EventDataFormatter formatter, IEventStore eventStore, IEventConsumerInfoRepository eventConsumerInfoRepository, ISemanticLog log) { Guard.NotNull(log, nameof(log)); Guard.NotNull(formatter, nameof(formatter)); Guard.NotNull(eventStore, nameof(eventStore)); Guard.NotNull(eventConsumerInfoRepository, nameof(eventConsumerInfoRepository)); this.log = log; this.formatter = formatter; this.eventStore = eventStore; this.eventConsumerInfoRepository = eventConsumerInfoRepository; }
public HandleEvents() { serializerSettings.Converters.Add(new PropertiesBagConverter()); formatter = new EventDataFormatter(typeNameRegistry, serializerSettings); }
public MyEventConsumerGrain(EventDataFormatter formatter, IEventStore eventStore, ISemanticLog log) : base(formatter, eventStore, log) { }