Channels
The Notification Service supports seven delivery channels. Each channel implements the NotificationChannel interface and is responsible for formatting and delivering the notification through its specific transport.
Channel Architecture
public interface NotificationChannel {
void send(Notification notification, RenderedTemplate template);
boolean supports(Notification.Channel channel);
}All channels are auto-discovered by Spring and routed based on the notification's channel field.
Email Channel
The EmailChannel sends emails via SMTP with support for HTML templates, attachments, and tracking pixels.
| Property | Description |
|---|---|
| Transport | JavaMail SMTP |
| HTML Support | Full HTML with inline CSS |
| Tracking | Open tracking via pixel, click tracking via redirect |
| Headers | List-Unsubscribe (RFC 8058) |
spring:
mail:
host: ${SMTP_HOST}
port: ${SMTP_PORT}
username: ${SMTP_USERNAME}
password: ${SMTP_PASSWORD}
properties:
mail.smtp.auth: true
mail.smtp.starttls.enable: trueSlack Channel
The SlackChannel sends messages to Slack channels via incoming webhooks.
public class SlackChannel implements NotificationChannel {
// Posts Block Kit formatted messages to Slack webhook URLs
}Microsoft Teams Channel
The TeamsChannel sends adaptive card messages to Microsoft Teams via webhook connectors.
Push Channel
The PushChannel sends mobile push notifications via Firebase Cloud Messaging (FCM) or Apple Push Notification service (APNs).
In-App Channel
The InAppChannel stores notifications in the database for retrieval by the frontend application. These notifications appear in the user's notification center.
Webhook Channel
The WebhookChannel delivers notifications to arbitrary HTTP endpoints configured by the tenant. It supports custom headers, retry logic, and signature verification.
Channel Selection
When sending a notification, specify the channel in the request:
{
"channel": "EMAIL"
}Valid channel values: EMAIL, SMS, PUSH, SLACK, TEAMS, IN_APP, WEBHOOK