Azure Service Bus
Azure
Open Source
Distributes notifications across gateway instances via Azure Service Bus topics.
Source code: Notiway.Plugins.Azure.Brokers.AzureServiceBus
Compatibility
| Pairs with | Azure Service Bus Buffer |
| Product | Notiway Notify |
Installation
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
Infra__Plugins__Broker__Name | Yes | — | Set to AzureServiceBus |
Infra__Plugins__Broker__Version | Yes | — | Plugin version (e.g., 0.12.0) |
Infra__Plugins__Broker__Config__ConnectionString | Yes | — | Azure Service Bus connection string |
Infra__Plugins__Broker__Config__TopicName | No | notiway | Service Bus topic name used for broadcasting notifications |
Infrastructure
- Create an Azure Service Bus namespace — Standard or Premium tier.
- Create a topic in the namespace (or use the default
notiwayname). - Subscriptions are managed automatically — each Notiway instance creates its own subscription on startup.
Docker Compose
docker-compose.yml
services:
notiway:
image: notiway/notify:portable-0.5.0
ports:
- "5000:8080"
environment:
- Infra__Plugins__Broker__Name=AzureServiceBus
- Infra__Plugins__Broker__Version=0.12.0
- Infra__Plugins__Broker__Config__ConnectionString=Endpoint=sb://your-namespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=your-key
- Infra__Plugins__Broker__Config__TopicName=notiwayUsage
Publish notifications to the Service Bus topic from your backend. The message body must be the notification JSON.
var client = new ServiceBusClient("your-connection-string");
var sender = client.CreateSender("notiway");
await sender.SendMessageAsync(new ServiceBusMessage(JsonSerializer.Serialize(notification)));const { ServiceBusClient } = require("@azure/service-bus");
const client = new ServiceBusClient("your-connection-string");
const sender = client.createSender("notiway");
await sender.sendMessages({ body: JSON.stringify(notification) });from azure.servicebus import ServiceBusClient, ServiceBusMessage
import json
client = ServiceBusClient.from_connection_string("your-connection-string")
sender = client.get_topic_sender("notiway")
sender.send_messages(ServiceBusMessage(json.dumps(notification)))ServiceBusClientBuilder builder = new ServiceBusClientBuilder()
.connectionString("your-connection-string");
ServiceBusSenderClient sender = builder.sender().topicName("notiway").buildClient();
sender.sendMessage(new ServiceBusMessage(objectMapper.writeValueAsString(notification)));// Azure Service Bus does not have an official C++ SDK.
// Use the REST API or the AMQP 1.0 protocol via a library like qpid-proton.
#include <proton/messaging_handler.hpp>
// Connect to Service Bus using AMQP 1.0
// Endpoint: amqps://<namespace>.servicebus.windows.net/notiway