protected TransactionModuleTestBase(IPublishMessages publisher) { this.publisher = publisher; bootstrapper = new TestingBootstrapper(publisher); browser = new Browser(bootstrapper); }
public AsynchronousDispatcherWireup(Wireup wireup, IPublishMessages publisher) : base(wireup) { this.PublishTo(publisher ?? new NullDispatcher()); this.Container.Register <IDispatchCommits>(c => new AsynchronousDispatcher( c.Resolve <IPublishMessages>(), c.Resolve <IPersistStreams>())); }
public SynchronousDispatcherWireup(Wireup wireup, IPublishMessages publisher) : base(wireup) { this.PublishTo(publisher ?? new NullDispatcher()); this.Container.Register<IDispatchCommits>(c => new SynchronousDispatcher( c.Resolve<IPublishMessages>(), c.Resolve<IPersistStreams>())); }
protected override void PublishMessages(IPublishMessages publisher, int count, Type eventType) { for (var i = 0; i < count; i++) { PublishMessage(publisher, eventType, i); } }
public SynchronousDispatcher(IPublishMessages bus, IPersistStreams persistence) { this.bus = bus; this.persistence = persistence; this.Start(); }
public AsynchronousDispatcher(IPublishMessages bus, IPersistStreams persistence) { this.bus = bus; this.persistence = persistence; this.Start(); }
public Bus(ISerializeMessages messageSerializer, ITransportMessages messageTransport, IRouteMessageToEndpoint messageRouter, IPublishMessages messagePublisher, IProcessMessages messageProcessor) { this.messageSerializer = messageSerializer; this.messageTransport = messageTransport; this.messageRouter = messageRouter; this.messagePublisher = messagePublisher; this.messageProcessor = messageProcessor; }
private IStoreEvents GetInitializedEventStore(IPublishMessages bus) { return Wireup.Init() //.UsingRavenPersistence(BootStrapper.RavenDbConnectionStringName, new ByteStreamDocumentSerializer(BuildSerializer())) .UsingRavenPersistence(BootStrapper.RavenDbConnectionStringName, new NullDocumentSerializer()) .UsingSynchronousDispatcher(bus) .Build(); }
public RegisterWrappers(ISendMessages sender, IPublishMessages publisher, IDeferMessages defer, ScenarioContext sc, ReadOnlySettings settings) { var container = settings.Get <IConfigureComponents>("SC.ConfigureComponent"); container.RegisterSingleton(typeof(ISendMessages), new SendMessagesWrapper(sender, sc)); container.RegisterSingleton(typeof(IPublishMessages), new PublishMessagesWrapper(publisher, sc)); container.RegisterSingleton(typeof(IDeferMessages), new DeferMessagesWrapper(defer, sc)); }
public ClientProxy(string showId, string clientConnectionId, IEnumerable <string> seatsReservedAsInitiallyViewedByTheClient, IPublishMessages messagePublisher) { _showId = showId; _clientConnectionId = clientConnectionId; _messagePublisher = messagePublisher; _seatsReservedAsViewedByTheClient = seatsReservedAsInitiallyViewedByTheClient?.ToList(); }
private IStoreEvents GetInitializedEventStore(IPublishMessages bus) { return(Wireup.Init() //.UsingRavenPersistence(BootStrapper.RavenDbConnectionStringName, new ByteStreamDocumentSerializer(BuildSerializer())) .UsingRavenPersistence(BootStrapper.RavenDbConnectionStringName, new NullDocumentSerializer()) .UsingSynchronousDispatcher(bus) .Build()); }
public AsynchronousDispatcher( IPublishMessages bus, IPersistStreams persistence, Action<Commit, Exception> handleException) { this.bus = bus; this.persistence = persistence; this.handleException = handleException ?? ((c, e) => { }); this.Start(); }
protected override void PublishMessages(IPublishMessages publisher, int count, Type eventType) { using (var tx = new TransactionScope()) { for (var i = 0; i < count; i++) { PublishMessage(publisher, eventType, i); } tx.Complete(); } }
public ShowsController(IProvideAuditoriumSeating auditoriumSeating, IProvideReservedSeats reservedSeats, ISuggestSeats seatSuggestionsProvider, IProvidePrices pricingProvider, IHubContext <ReservationsHub> hubContext, IPublishMessages publisher, IHostClientProxies clientProxyPool) { _auditoriumSeating = auditoriumSeating; _reservedSeats = reservedSeats; _seatSuggestionsProvider = seatSuggestionsProvider; _pricingProvider = pricingProvider; _hubContext = hubContext; _publisher = publisher; _clientProxyPool = clientProxyPool; }
private async Task PublishNewReservedSeats(IEnumerable <string> newlyAddedReservations) { var topic = TopicBuilder.BuildTopicFor(_showId); if (_messagePublisher == null) { // TEMP: should not happen at runtime!!!! _messagePublisher = _publishersFactory(); } // Should we catch here? // var publisher = _publishersFactory(); // get a SignalR publisher await _messagePublisher.SendNewlyReservedSeatsAsync(topic, _clientConnectionId, newlyAddedReservations.ToArray()); }
private IStoreEvents GetInitializedEventStore(IPublishMessages bus) { return(Wireup.Init() .UsingSqlPersistence(AppConfig.SqlDBConnectionStringName) //.InitializeStorageEngine() .UsingJsonSerialization() .Compress() .UsingSynchronousDispatcher(bus) .Build()); // .UsingSqlPersistence("EventStore") // .InitializeStorageEngine() // .UsingJsonSerialization() // .Compress() // .EncryptWith(EncryptionKey) //.HookIntoPipelineUsing(new[] { new AuthorizationPipelineHook() }) //.UsingAsynchronousDispatcher() // .PublishTo(new DelegateMessagePublisher(DispatchCommit)) //.Build(); }
public StopLossProcessManager(IPublishMessages publisher) { _publisher = publisher; }
protected void PublishMessage(IPublishMessages publisher, Type eventType, int i) { publisher.Publish(GenerateTransportMessage(i, eventType.FullName), new[] { eventType }); }
public TestingBootstrapper(IPublishMessages publisher) { this.publisher = publisher; }
protected override void SetupClient() { this.clientChannel = this.channelFactory.CreatePublisher(); this.clientChannel.Connect(endpoint); }
public static SynchronousDispatcherWireup UsingSynchronousDispatcher(this Wireup wireup, IPublishMessages publisher) { return new SynchronousDispatcherWireup(wireup, publisher); }
public when_publishing_topic_message_to_rabbitmq() { bus = new FakeBus(); message = new TopicTestMessage(); publisher = new RabbitMQ.Publisher(bus); }
public MsmqReceiver(Configure configure, CriticalError criticalError, IPublishMessages publisher) { this.configure = configure; this.criticalError = criticalError; this.publisher = publisher; }
public static AsynchronousDispatcherWireup UsingAsynchronousDispatcher(this Wireup wireup, IPublishMessages publisher) { return(new AsynchronousDispatcherWireup(wireup, publisher)); }
public DispatchToTransportStep(ISendMessages sender, IPublishMessages publisher) { this.publisher = publisher; this.sender = sender; }
public when_publishing_a_null_message_to_rabbitmq() { bus = new FakeBus(); message = null; publisher = new global::Workflow.RabbitMQ.Publisher(bus); }
//public ClientProxyPool(InstantiatePublishers publishersFactory, ShowReservationsWatcherPool reservationsWatcherPool) //{ // _publishersFactory = publishersFactory; // _reservationsWatcherPool = reservationsWatcherPool; //} public ClientProxyPool(IPublishMessages messagePublisher, IOwnReservationsWatchers reservationsWatcherPool) { _messagePublisher = messagePublisher; _reservationsWatcherPool = reservationsWatcherPool; }
public when_publishing_a_message_and_the_underlying_bus_fails() { bus = new FailingBus(); message = new TestMessage(); publisher = new global::Workflow.RabbitMQ.Publisher(bus, new TestingRetryStrategy()); }
public PublishMessagesWrapper(IPublishMessages wrappedPublisher, ScenarioContext context) { this.wrappedPublisher = wrappedPublisher; sessionId = context.SessionId; }
public PublisherFactory(IPublishMessages publisher) { _publisher = publisher; }
public SynchronousDispatcherWireup PublishTo(IPublishMessages instance) { this.Container.Register(instance); return this; }
protected abstract void PublishMessages(IPublishMessages publisher, int count, Type eventType);
public AsynchronousDispatcherWireup PublishTo(IPublishMessages instance) { this.Container.Register(instance); return(this); }