Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
api:notifications [2024/09/20 21:18] – [How to debug it?] daniel | api:notifications [2024/10/03 15:50] (current) – removed daniel | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Notifications ====== | ||
- | ===== Notification Delivery Service ===== | ||
- | |||
- | The Notification Delivery Service is responsible for queuing notifications and delivering them to the provider’s APIs. This service supports sending Emails, SMS, push notifications and specific notifications to T4NotificationService. | ||
- | |||
- | ==== How does it work? ==== | ||
- | |||
- | {{ : | ||
- | |||
- | Our server sends objects to an Azure Service Bus, directing them to their respective queues. Each type of notification has its own dedicated queue. Azure Functions listen to these queues and are responsible for forwarding the messages to their destinations. The Azure queues are configurable, | ||
- | |||
- | ==== How to use it? ==== | ||
- | |||
- | There is one class per type of notification you can send with Delivery Service, the classes are: | ||
- | * EmailNotificationDeliveryService | ||
- | * SMSNotificationDeliveryService | ||
- | * PushNotificationDeliveryService | ||
- | * NotificationBodyDeliveryService | ||
- | |||
- | There are interfaces for each component, enabling the use of dependency injection in services and facilitating mocking in integration testing. Each class includes two types of constructors: | ||
- | |||
- | You can find code examples in the repo T4, file T4\System\Components\T4ServerUtil\Notification\DeliveryServices\EmailNotificationDeliveryService.cs this is a Unit Test repository and you can run the examples directly. | ||
- | |||
- | ==== How to debug it? ==== | ||
- | |||
- | In Azure you will find a resource group per environment, | ||
- | |||
- | * cts-t4-notificationdeliverysvc-test-rg | ||
- | * cts-t4-notificationdeliverysvc-sim-rg | ||
- | * cts-t4-notificationdeliverysvc-live-rg | ||
- | |||
- | Inside each each resource group you can find the service busses, all of them have dead letter queues to see the notifications that were not deliver due to an error, it also has an applications insights instance to query the execution logs | ||
- | |||
- | ====== Notification Service ====== | ||
- | |||