0.12.0

Compatibility

Pairs withAzure Service Bus Buffer
ProductNotiway Notify

Installation

Environment Variables

VariableRequiredDefaultDescription
Infra__Plugins__Broker__NameYesSet to AzureServiceBus
Infra__Plugins__Broker__VersionYesPlugin version (e.g., 0.12.0)
Infra__Plugins__Broker__Config__ConnectionStringYesAzure Service Bus connection string
Infra__Plugins__Broker__Config__TopicNameNonotiwayService Bus topic name used for broadcasting notifications

Infrastructure

  1. Create an Azure Service Bus namespace — Standard or Premium tier.
  2. Create a topic in the namespace (or use the default notiway name).
  3. 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=notiway

Usage

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