public Task StartAsync(CancellationToken cancellationToken) { try { logger.LogInformation("{ServiceName} starting...", ServiceName); messageBusListenerBuilder.Build().StartListening(); } catch (Exception ex) { logger.LogError(ex, "Error when {ServiceName} starting", ServiceName); } return(Task.CompletedTask); }
public Task StartAsync(CancellationToken cancellationToken) { logger.LogInformation("EventListenerHostedService Starting..."); messageBusListenerBuilder.Build().StartListening(); return(Task.CompletedTask); }