In this lesson you build the first part of the sketch from lesson 3.5.1: the nightly fetch sends one ImportTenderNotice message per notice into the queue tender-import, and a worker of its own reads it and writes the tenders to SQL. Locally this runs against the Service Bus emulator; in Azure it runs against a namespace that a Bicep module creates without a single key.

First you clarify what a namespace is, which tier can do what, and how peek-lock works in detail. A small exercise against the emulator makes it visible.

Namespace, queue, tier

A namespace is the container for everything that belongs to Service Bus. It has an address of its own, <name>.servicebus.windows.net, a tier and a region. Inside it live the entities: queues, topics and their subscriptions. The name of a namespace is globally unique. By the Kladde's naming scheme from lesson 3.1.3 it is called sbns-kladde-dev- with a suffix behind it, in the examples sbns-kladde-dev-abc123; in Bicep the suffix comes from uniqueString, as with the Key Vault in lesson 3.3.2.

Service Bus has three tiers:

Tier What it can do Billing
Basic queues only; peek-lock, dead-letter queue, scheduled messages; messages up to 256 KB, time to live at most 14 days by operations
Standard everything in Basic, plus topics and subscriptions, sessions, transactions, duplicate detection base fee per hour and operations
Premium everything in Standard on dedicated hardware (messaging units), messages up to 100 MB, private endpoints and geo-replication per messaging unit and hour

The amounts are in the pricing calculator and on the Service Bus pricing page. For the Kladde this holds: Basic is enough for this lesson and costs only what is actually sent and received. Topics (lesson 3.5.3) and duplicate detection (lesson 3.5.4) exist only from Standard on, and Standard has a base fee. These two lessons therefore work with the emulator. Whether you switch the Kladde in Azure to Standard afterwards is something you decide with your budget in mind; you write down the costs in docs/costs.md.