37. Use Service Bus Basic tier for file events
Date: 2026-10-12
Status
Proposed
Context
As decided in ADR 0020, the BFF publishes one event per selected file and the processing service consumes it through the Dapr component files, of type pubsub.azure.servicebus.queues. The Service Bus namespace was created by hand, outside Bicep, so its tier is not recorded, and the component connects with the namespace’s root management key. The component only uses queues. The Basic tier supports queues and dead-lettering, while the Standard tier adds topics, sessions and duplicate detection, which Unicorn does not use, for a base charge of 10 US dollars a month.
The full analysis, with three options, is in the ArcKit record ARC-001-ADR-005 (projects/001-unicorn/decisions/ in the workspace).
Decision
We will define the namespace and the files queue in Bicep, on the Basic tier in West Europe.
The Dapr component connects with managed identity (ADR 0033): the BFF gets the Data Sender role and the processing service the Data Receiver role on the queue. The component no longer manages entities, since Bicep creates the queue.
Events carry the file id instead of the file content, so they stay under the 256 KB message limit. The BFF writes the content to the state store and the processing service reads it from there, since only the BFF holds Drive access (ADR 0034).
Consequences
Service Bus costs a few cents over three years instead of up to 10 US dollars a month. The root management key is no longer used and can be rotated. Topics, sessions and duplicate detection are not available; a second consumer of file events would reopen this decision. The namespace changes once: switch when the queue is empty and keep the old namespace until the smoke test passes. We must check that the Dapr queues component starts without management rights. No container or connection changes in the IcePanel model.