public static void Main(string[] args) { _client = BusClientFactory.CreateDefault( cfg => cfg .SetBasePath(Environment.CurrentDirectory) .AddJsonFile("rawrabbit.json"), ioc => ioc .AddSingleton<IConfigurationEvaluator, AttributeConfigEvaluator>() ); _client.SubscribeAsync<ValuesRequested>(ServeValuesAsync); _client.RespondAsync<ValueRequest, ValueResponse>(SendValuesThoughRpcAsync); }
public OrderCreatedSubscription(ILogger log, IBusClient busClient) { this.log = log; this.busClient = busClient; }
public FibonacciController(IBusClient busClient, IRepository repository) { _busClient = busClient; _repository = repository; }
public EventPublisher(IBusClient bus) => _bus = bus;
public AccountController(IAuthenticateService authenticateService, IBusClient busClient) { _authenticateService = authenticateService; _busClient = busClient; }
public static ISubscription SubscribeToCommand <TCommand>(this IBusClient bus, ICommandHandler <TCommand> handler, string name = null) where TCommand : ICommand { return(bus.SubscribeAsync <TCommand>(async(msg, context) => await handler.HandleAsync(msg), cfg => cfg.WithQueue(q => q.WithName(GetExchangeName <TCommand>(name))))); }
public ActivitiesController(IBusClient busClient) { _busClient = busClient; }
public ProjectRepository(IEventStore eventStore, IBusClient bus) : base(eventStore, bus) { }
public RequestNewOrganizationHandler(IBusClient bus, IUserFeaturesManager userFeaturesManager) { _bus = bus; _userFeaturesManager = userFeaturesManager; }
public BusPublisher(IBusClient busClient) { _busClient = busClient; }
public ActivityController(IBusClient bus) { _bus = bus; }
public BuySecuritiesHandler(IPortfolioService portfolioService, IBusClient busClient) { this.portfolioService = portfolioService; this.busClient = busClient; }
public ValuesController(IBusClient busClient, ILogger <ValuesController> logger) { _busClient = busClient; _logger = logger; }
public DataController(IBusClient busClient, ILogger <SampleDataController> logger) { _busClient = busClient; _logger = logger; }
public Heartbeat(IBusClient client, int timeBetweenMsg, int maxTimeBetween, int maxMsgLost) { _client = client; _publisher = new Publisher(client, timeBetweenMsg); _subscriber = new Subscriber(client, maxTimeBetween, maxMsgLost); }
public MessageHandlerExceptionTests() { _errorHandler = new Mock<IErrorHandlingStrategy>(); _client = BusClientFactory.CreateDefault(null, ioc => ioc.AddSingleton(c => _errorHandler.Object)); }
public ValuesController(IBusClient busClient, ILoggerFactory loggerFactory) { _busClient = busClient; _logger = loggerFactory.CreateLogger<ValuesController>(); _random = new Random(); }
public FibController(IBusClient client, IRepository repo) { _client = client; _repo = repo; }
public static Task WithCommandHandlerAsync <TCommand>(this IBusClient bus, ICommandHandler <TCommand> handler) where TCommand : ICommand => bus.SubscribeAsync <TCommand>(msg => handler.HandleAsync(msg), ctx => ctx.UseSubscribeConfiguration(cfg => cfg.FromDeclaredQueue(q => q.WithName(GetQueueName <TCommand>()))));
public CommandDispatcher(IBusClient bus) { _bus = bus; }
public UsersController(IBusClient busClient) { _busClient = busClient; }
public MathController(IBusClient client, IRepository repository) { _client = client; _repository = repository; }
public static ISubscription SubscribeToEvent <TEvent>(this IBusClient bus, IEventHandler <TEvent> handler, string name = null) where TEvent : IDomainEvent { return(bus.SubscribeAsync <TEvent>(async(msg, context) => await handler.HandleAsync(msg), cfg => cfg.WithQueue(q => q.WithName(GetExchangeName <TEvent>(name))))); }
private readonly IActivityRepository activityRepository; // It's a sample. In a more realistic scenario, it should be an application service here. public ActivitiesController(IBusClient busClient, IActivityRepository activityRepository) { this._busClient = busClient; this.activityRepository = activityRepository; }
public ActivitiesController(IBusClient busClient, IActivityRepository repository) { _busClient = busClient; _repository = repository; }
public ActivitiesController(IBusClient busClient, IActivityRepository activityRepo, ILogger <ActivitiesController> logger) { _activityRepository = activityRepo; _busClient = busClient; _logger = logger; }
public static Task WithEventHandlerAsync <TEvent>(this IBusClient bus, IEventHandler <TEvent> handler) where TEvent : IEvent => bus.SubscribeAsync <TEvent>(msg => handler.HandleAsync(msg), ctx => ctx.UseConsumerConfiguration(cfg => cfg.FromDeclaredQueue(q => q.WithName(GetQueueName <TEvent>())) ));
public BookController(IBusClient bus) { _bus = bus; }
public BusBuilder(IWebHost webHost, IBusClient bus) { _webHost = webHost; _bus = bus; }
public RawRabbitWrapper(EventDbContext context, IBusClient rawRabbitClient, ILogger <RawRabbitWrapper> logger) { _context = context; _rawRabbitClient = rawRabbitClient; _logger = logger; }
public BusBuilder UseRabbitMq() { _bus = (IBusClient)_webHost.Services.GetService(typeof(IBusClient)); return(new BusBuilder(_webHost, _bus)); }
public CreateUserHandler(IBusClient busClient, ILogger <CreateUserHandler> logger, IUserService userService) { _userService = userService; _busClient = busClient; _logger = logger; }
public CreateUserCommandHandler(IBusClient busClient) { _busClient = busClient; }
public ScanTaskBlob(IBusClient bus, IStreamingRoot storage) { _bus = bus; _storage = storage; }