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