Azure Service Bus
Send Dataflow's events to an Azure Service Bus queue or topic, with a Send-only access policy, from our delivery server's address.
Each event becomes one message on your queue or topic. Dataflow signs in with the connection string of a shared access policy that can only send.
Azure Service Bus deliveries come from our delivery server's address, not the egress address that every other destination type uses. If your namespace filters by IP, allow the address GET /v1/destinations/types gives for azure_servicebus (below).
Set up Service Bus
Create the queue or topic
In a Service Bus namespace, + Queue or + Topic, or:
az servicebus queue create --resource-group my-group --namespace-name acme-bus --name dataflow-eventsTopics need the Standard or Premium tier. Add a subscription to a topic, so its messages are kept until you read them.
Create a policy that can only send
On the queue or topic: Settings → Shared access policies → Add, with Send only. Or:
az servicebus queue authorization-rule create --resource-group my-group --namespace-name acme-bus \
--queue-name dataflow-events --name dataflow-send --rights Send
az servicebus queue authorization-rule keys list --resource-group my-group --namespace-name acme-bus \
--queue-name dataflow-events --name dataflow-send --query primaryConnectionString --output tsvCopy its connection string: Endpoint=sb://acme-bus.servicebus.windows.net/;SharedAccessKeyName=dataflow-send;SharedAccessKey=…;EntityPath=dataflow-events. For a topic, use az servicebus topic authorization-rule … the same way.
Allow our delivery server's address
curl https://dataflow.piloterr.com/v1/destinations/types -H "x-api-key: YOUR_API_KEY"Take the exit_ips of azure_servicebus ("network": "outpost"). If your namespace's Networking is set to Selected networks, add them as IP firewall rules (Standard and Premium tiers). The egress address of the other types does not work here.
Add the destination
curl https://dataflow.piloterr.com/v1/destinations \
-H "x-api-key: YOUR_API_KEY" -H "content-type: application/json" \
-d '{
"type": "azure_servicebus",
"config": { "name": "dataflow-events" },
"credentials": { "connection_string": "Endpoint=sb://acme-bus.servicebus.windows.net/;SharedAccessKeyName=dataflow-send;SharedAccessKey=YOUR_KEY;EntityPath=dataflow-events" },
"topics": ["run.completed", "run.failed"]
}'| Field | Required | Secret | Holds |
|---|---|---|---|
config.name | yes | no | The queue's or topic's name. |
credentials.connection_string | yes | yes | The policy's connection string, of a namespace in servicebus.windows.net (or the China and US Government clouds). |
The connection string is stored encrypted and shown masked (Endp…). To change it, send it again with PATCH. See Credentials.
Network
Dataflow connects to <namespace>.servicebus.windows.net over AMQP with TLS, port 5671, directly from our delivery server: this type does not go through the egress proxy. There is nothing to open on your side but the IP firewall rule above, when your namespace has one.
What the queue receives
- Body: the event payload, as JSON.
- Application properties:
event-id(the payload'sid: deduplicate on it),topic(such asrun.completed) andtimestamp(when it was sent, RFC 3339).
A topic subscription's SQL filter can keep some topics only, for example topic = 'run.completed'.
A Standard namespace takes messages up to 256 KB, and a run.results batch can be close to 1 MiB: those deliveries fail. Use a Premium namespace, or take the rows from the export link of run.completed.
Test it
Send a test event from the dashboard, or POST /v1/destinations/{id}/test (details), then open the queue's Service Bus Explorer → Peek from start. The delivery log's code is OK, or ERR for any failure.
| Problem | Fix |
|---|---|
422 validation_failed on credentials.connection_string | Paste the whole connection string, starting with Endpoint=sb://. |
ERR on every delivery | Check, in this order: the namespace's IP firewall allows our delivery server's address (not the egress address); the policy has Send on this queue or topic; config.name is that queue or topic; the key was not regenerated. |
ERR on run.results only | The batch is over the namespace's message size: see above. |
Other errors: Errors.