diff --git a/src/Liquid.Core/Implementations/LiquidBackgroundService.cs b/src/Liquid.Core/Implementations/LiquidBackgroundService.cs index a7577de..cb412ac 100644 --- a/src/Liquid.Core/Implementations/LiquidBackgroundService.cs +++ b/src/Liquid.Core/Implementations/LiquidBackgroundService.cs @@ -39,7 +39,7 @@ public LiquidBackgroundService(IServiceProvider serviceProvider, ILiquidConsumer protected override async Task ExecuteAsync(CancellationToken stoppingToken) { _consumer.ConsumeMessageAsync += ProcessMessageAsync; - _consumer.RegisterMessageHandler(); + _consumer.RegisterMessageHandler(stoppingToken); await Task.CompletedTask; } diff --git a/src/Liquid.Core/Interfaces/ILiquidConsumer.cs b/src/Liquid.Core/Interfaces/ILiquidConsumer.cs index a837bf7..44cc3fc 100644 --- a/src/Liquid.Core/Interfaces/ILiquidConsumer.cs +++ b/src/Liquid.Core/Interfaces/ILiquidConsumer.cs @@ -14,7 +14,7 @@ public interface ILiquidConsumer /// /// Initialize handler for consume messages from topic or queue. /// - void RegisterMessageHandler(); + void RegisterMessageHandler(CancellationToken cancellationToken = default); /// /// Defining the message processing function. diff --git a/src/Liquid.Core/Liquid.Core.csproj b/src/Liquid.Core/Liquid.Core.csproj index 13796ad..eb1ddb3 100644 --- a/src/Liquid.Core/Liquid.Core.csproj +++ b/src/Liquid.Core/Liquid.Core.csproj @@ -10,7 +10,7 @@ Avanade 2019 https://github.com/Avanade/Liquid-Application-Framework logo.png - 8.0.0-beta-07 + 8.0.0-beta-08 true {C33A89FC-4F4D-4274-8D0F-29456BA8F76B} true