public BestelStatusController(
     IBusContext <IConnection> context,
     IBestellingDataMapper bestellingDataMapper,
     IEventPublisher eventPublisher,
     ILoggerFactory loggerFactory)
 {
     _bestellingDataMapper = bestellingDataMapper;
     _eventPublish         = eventPublisher;
     _commandSender        = context.CreateCommandSender();
     _logger = loggerFactory.CreateLogger <BestelStatusController>();
 }
        private void SendReplayCommand()
        {
            ICommandSender      commandSender       = _context.CreateCommandSender();
            ReplayEventsCommand replayEventsCommand = new ReplayEventsCommand()
            {
                ExchangeName = NameConstants.BestelServiceEventReplayExchange,
                EventType    = NameConstants.CatalogusServiceCategorieAanCatalogusToegevoegdEvent
            };

            commandSender.SendCommandAsync(new RequestCommandMessage(
                                               message: JsonConvert.SerializeObject(replayEventsCommand),
                                               type: NameConstants.AuditlogReplayCommandType,
                                               correlationId: "",
                                               routingKey: NameConstants.AuditlogQueue
                                               ));
        }
예제 #3
0
        private void SendReplayCommand(string eventType)
        {
            ICommandSender      commandSender       = _context.CreateCommandSender();
            ReplayEventsCommand replayEventsCommand = new ReplayEventsCommand()
            {
                ExchangeName = NameConstants.BffWebshopEventReplayExchange,
                Topic        = eventType
            };

            commandSender.SendCommandAsync(new RequestCommandMessage(
                                               message: JsonConvert.SerializeObject(replayEventsCommand),
                                               type: NameConstants.AuditlogReplayCommandType,
                                               correlationId: "",
                                               routingKey: NameConstants.AuditlogQueue
                                               ));
        }
 /// <summary>
 /// Create a publisher and initialize a sender
 /// </summary>
 public CommandPublisher(IBusContext <IConnection> context, ILoggerFactory loggerFactory = null)
 {
     _sender = context.CreateCommandSender();
     loggerFactory ??= new NullLoggerFactory();
     _logger = loggerFactory.CreateLogger <CommandPublisher>();
 }
예제 #5
0
 public CommandPublisher(IBusContext <IConnection> context)
 {
     Sender   = context.CreateCommandSender();
     _logger  = NijnLogger.CreateLogger <CommandPublisher>();
     assembly = Assembly.GetEntryAssembly();
 }
예제 #6
0
 public CommandPublisher(IBusContext <IConnection> context)
 {
     Sender  = context.CreateCommandSender();
     _logger = NijnLogger.CreateLogger <CommandPublisher>();
 }