From 4e43da836236e276578079e050f04100298f84e2 Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Fri, 3 May 2024 12:39:28 +0300 Subject: [PATCH] Fix routing keys --- src/Nocr.TelegramListener.AppServices/Constants.cs | 9 +++++++++ src/Nocr.TelegramListener.Host/Infrastructure/Startup.cs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/Nocr.TelegramListener.AppServices/Constants.cs diff --git a/src/Nocr.TelegramListener.AppServices/Constants.cs b/src/Nocr.TelegramListener.AppServices/Constants.cs new file mode 100644 index 0000000..1e78747 --- /dev/null +++ b/src/Nocr.TelegramListener.AppServices/Constants.cs @@ -0,0 +1,9 @@ +namespace Nocr.TelegramListener.AppServices; + +public static class Constants +{ + public static class RoutingKeys + { + public const string Subscriptions = "nocr.text.matcher.subscriptions"; + } +} \ No newline at end of file diff --git a/src/Nocr.TelegramListener.Host/Infrastructure/Startup.cs b/src/Nocr.TelegramListener.Host/Infrastructure/Startup.cs index 5765aa4..f033ff3 100644 --- a/src/Nocr.TelegramListener.Host/Infrastructure/Startup.cs +++ b/src/Nocr.TelegramListener.Host/Infrastructure/Startup.cs @@ -50,6 +50,6 @@ public class Startup { var bus = app.ApplicationServices.GetRequiredService(); // TODO: - bus.Advanced.Topics.Subscribe("nocr.text.matcher.matches").GetAwaiter().GetResult(); + bus.Advanced.Topics.Subscribe(Constants.RoutingKeys.Subscriptions).GetAwaiter().GetResult(); } } \ No newline at end of file