One API. Every channel.
Stop writing different code for each notification channel.
NotifyHub gives you a single fluent Java API to send via 16 channels,
with fallback chains, templates, retry, scheduling, and more.
NotifyHub is a unified notification library for Java and Spring Boot. Instead of integrating each channel separately (Twilio SDK for SMS, JavaMail for email, webhook calls for Slack...), you use one fluent API for everything.
Add as a Maven/Gradle dependency. Spring Boot auto-configures everything. Just @Autowired NotifyHub and send.
Don't use Java? Run our Docker image and call HTTP endpoints from any language. Swagger UI included.
MCP Server with 26 tools. Let Claude, Cursor, or any AI assistant send notifications on your behalf.
Every channel uses the same API. Most use zero external SDKs — just the JDK HttpClient. Add only the channels you need.
SMTP (Gmail, SES, Outlook, any). HTML templates, attachments, TLS.
Twilio. Send text messages worldwide with delivery status.
Twilio. Same setup as SMS, different channel.
Incoming Webhooks. Named channels, no SDK needed.
Bot API. Send to any chat ID or named alias.
Webhooks. Custom username, avatar, named servers.
Incoming Webhooks. MessageCard format.
Webhooks. Send to any Google Chat space.
FCM. Mobile push notifications with title and body.
JDK WebSocket with auto-reconnect. Real-time.
Any HTTP endpoint. PagerDuty, Datadog, custom APIs.
API v2. Post tweets with OAuth 1.0a. No SDK needed.
REST API. Publish posts with OAuth 2.0 Bearer token.
API. Create pages in any database. Integration Token.
Helix API. Chat messages + polls. No SDK needed.
Data API v3. Live chat messages. No SDK needed.
Implement one interface. Your channel, your rules.
NotifyHub isn't just a message sender. It's a complete notification infrastructure with retry, tracking, templates, scheduling, and more.
Builder pattern with chaining. .to().via().fallback().template().send() — readable and type-safe.
If WhatsApp fails, try SMS. If SMS fails, try Email. Automatic failover with no extra code.
HTML for email, plain text for chat. Template versioning for A/B tests. i18n with locale fallback.
toAll(recipients) and toAllNotifiable(users). Send to thousands with failure isolation.
.schedule(Duration.ofHours(24)) — send later. Cancel, check status, view remaining delay.
Exponential or fixed backoff. Failed after all retries? Goes to Dead Letter Queue for manual reprocessing.
Token bucket per channel. Configurable limits. URGENT priority bypasses the limiter.
Every send returns a DeliveryReceipt with ID, status, timestamp. In-memory or JPA persistence.
Content-hash or explicit key. Same message won't be sent twice within the TTL window.
sendAsync() and sendAllAsync() return CompletableFuture. Non-blocking sends.
Define aliases like "alerts", "devops". Send to a name, resolve to webhook URL or chat ID.
RabbitMQ and Kafka modules. Enqueue notifications for async, distributed processing.
Auto-configured tracing via Micrometer Observation API. Export spans to Jaeger, Tempo, or any OTLP collector.
A few lines of code. That's all it takes.
notify.to("user@example.com")
.via(Channel.EMAIL)
.fallback(Channel.SMS)
.subject("Order Confirmed")
.template("order-confirmed")
.param("orderId", "ORD-2024")
.send();
notify.to(user)
.via(Channel.EMAIL)
.via(Channel.SLACK)
.via(Channel.DISCORD)
.subject("Security Alert")
.content("Login from a new device detected")
.sendAll();
notify.toAll(List.of("user1@test.com", "user2@test.com", "user3@test.com"))
.via(Channel.EMAIL)
.subject("System Maintenance")
.template("maintenance-notice")
.param("date", "2025-03-01")
.send();
DeliveryReceipt receipt = notify.to(user)
.via(Channel.EMAIL)
.subject("Reminder")
.content("Don't forget your appointment!")
.sendTracked();
receipt.getStatus(); // SENT
receipt.getId(); // uuid
receipt.getTimestamp(); // 2025-01-15T10:30:00Z
Add the dependency, configure your channels, and start sending.
<dependency>
<groupId>io.github.gabrielbbaldez</groupId>
<artifactId>notify-spring-boot-starter</artifactId>
<version>0.9.0</version>
</dependency>
<!-- Add the channels you need -->
<dependency>
<groupId>io.github.gabrielbbaldez</groupId>
<artifactId>notify-email</artifactId>
<version>0.9.0</version>
</dependency>
notify:
channels:
email:
host: smtp.gmail.com
port: 587
username: ${GMAIL_USER}
password: ${GMAIL_PASS}
from: noreply@myapp.com
tls: true
slack:
webhook-url: ${SLACK_WEBHOOK}
discord:
webhook-url: ${DISCORD_WEBHOOK}
retry:
max-attempts: 3
strategy: exponential
tracking:
enabled: true
@Autowired NotifyHub notify;
notify.to("user@example.com")
.via(Channel.EMAIL)
.fallback(Channel.SMS)
.subject("Welcome!")
.template("welcome")
.param("name", "Gabriel")
.send();
Don't use Java? No problem. Run NotifyHub as a REST API or MCP Server with Docker. Just set environment variables for the channels you want.
gabrielbbal10/notifyhub-api
Full REST API with Swagger UI on port 8080. Send notifications via HTTP from Python, Node.js, Go, cURL, or any language.
docker run -d -p 8080:8080 \
-e NOTIFY_CHANNELS_EMAIL_USERNAME=you@gmail.com \
-e NOTIFY_CHANNELS_EMAIL_PASSWORD=your-app-password \
-e NOTIFY_CHANNELS_EMAIL_FROM=you@gmail.com \
-e NOTIFY_CHANNELS_DISCORD_WEBHOOK_URL="https://discord.com/..." \
gabrielbbal10/notifyhub-api:latest
# Send email
curl -X POST "localhost:8080/send/email?to=user@test.com&subject=Hi&body=Hello!"
# Send Discord
curl -X POST "localhost:8080/send/discord?message=Deploy done!"
# Swagger UI
open http://localhost:8080/swagger-ui.html
gabrielbbal10/notifyhub-mcp
Model Context Protocol server with 26 tools for AI assistants. Connect to Claude Desktop, Claude Code, or Cursor.
{
"mcpServers": {
"notify-hub": {
"command": "docker",
"args": ["run", "-i", "--rm",
"-e", "NOTIFY_CHANNELS_DISCORD_WEBHOOK_URL=...",
"-e", "NOTIFY_CHANNELS_EMAIL_USERNAME=you@gmail.com",
"-e", "NOTIFY_CHANNELS_EMAIL_PASSWORD=app-password",
"-e", "NOTIFY_CHANNELS_EMAIL_FROM=you@gmail.com",
"gabrielbbal10/notifyhub-mcp"
]
}
}
}
Both Docker images use the same NOTIFY_CHANNELS_* variables. Only set the channels you need.
NOTIFY_CHANNELS_EMAIL_HOST smtp.gmail.comNOTIFY_CHANNELS_EMAIL_PORT 587NOTIFY_CHANNELS_EMAIL_USERNAME you@gmail.comNOTIFY_CHANNELS_EMAIL_PASSWORD app-passwordNOTIFY_CHANNELS_EMAIL_FROM you@gmail.comNOTIFY_CHANNELS_DISCORD_WEBHOOK_URL https://discord.com/...NOTIFY_CHANNELS_DISCORD_USERNAME NotifyHubNOTIFY_CHANNELS_SLACK_WEBHOOK_URL https://hooks.slack.com/...NOTIFY_CHANNELS_TELEGRAM_BOT_TOKEN 123456:ABC...NOTIFY_CHANNELS_TELEGRAM_CHAT_ID 123456789NOTIFY_CHANNELS_TEAMS_WEBHOOK_URL https://outlook.office.com/...NOTIFY_CHANNELS_SMS_ACCOUNT_SID AC...NOTIFY_CHANNELS_SMS_AUTH_TOKEN tokenNOTIFY_CHANNELS_SMS_FROM_NUMBER +15551234567NOTIFY_CHANNELS_GOOGLE_CHAT_WEBHOOK_URL https://chat.googleapis.com/...NotifyHub includes an MCP Server (Model Context Protocol) that exposes 26 tools. Connect it to Claude Desktop, Claude Code, Cursor, or any MCP-compatible AI client.
For high-throughput or distributed systems, enqueue notifications to RabbitMQ or Kafka. A consumer picks them up and sends via NotifyHub automatically.
notify-queue-rabbitmq
notify.queue.rabbitmq:
enabled: true
queue-name: notifyhub-notifications
exchange-name: notifyhub-exchange
routing-key: notification
notify-queue-kafka
notify.queue.kafka:
enabled: true
topic: notifyhub-notifications
consumer:
group-id: notifyhub-group
Built-in web UI at /notify-admin with 8 pages. Dark/light theme toggle, responsive design, shared CSS architecture.
Metric cards, recent activity feed, system status, channel overview.
Chart.js charts: volume, distribution, success rate, hourly heatmap.
Every delivery receipt. Filter by channel, status, recipient.
Failed after all retries. Inspect error, remove from queue.
All registered channels with health indicators and type info.
Complete event history with type filter. Sent, failed, scheduled, cancelled.
Manage contacts and segments with tag-based filtering.
HTTP callback config, recent deliveries, payload inspection.
NotifyHub is modular. The core has zero Spring dependency. Add only the channels and features you use.
| Module | What it does |
|---|---|
notify-core | Fluent API, templates, retry, DLQ, rate limiting, tracking. Zero Spring dependency. |
notify-spring-boot-starter | Auto-configures everything for Spring Boot. The main entry point. |
notify-email | SMTP email with Jakarta Mail. HTML, attachments, TLS/SSL. |
notify-sms | SMS + WhatsApp via Twilio. |
notify-slack | Slack via Incoming Webhooks. No SDK. |
notify-telegram | Telegram via Bot API. No SDK. |
notify-discord | Discord via Webhooks. No SDK. |
notify-teams | Microsoft Teams via Webhooks. No SDK. |
notify-google-chat | Google Chat via Webhooks. No SDK. |
notify-push-firebase | Firebase Cloud Messaging push notifications. |
notify-webhook | Generic HTTP webhooks. Configurable payload templates. |
notify-websocket | JDK WebSocket with auto-reconnect. |
notify-twitter | Twitter/X via API v2 with OAuth 1.0a. No SDK. |
notify-linkedin | LinkedIn via REST API with OAuth 2.0. No SDK. |
notify-notion | Notion via API. Create pages in any database. |
notify-twitch | Twitch via Helix API. Chat messages + polls. |
notify-youtube | YouTube via Data API v3. Live chat messages. |
notify-tracker-jpa | JPA-backed delivery tracking. Persist receipts to any database. |
notify-admin | Web dashboard for monitoring and DLQ management. |
notify-mcp | MCP Server for AI assistants (26 tools). |
notify-queue-rabbitmq | RabbitMQ producer/consumer for async notifications. |
notify-queue-kafka | Apache Kafka producer/consumer for async notifications. |