Skip to content

Commit 2ea69e5

Browse files
committed
chore(conformance): vendor the Azure Service Bus (asb) binding block
1 parent 3d62676 commit 2ea69e5

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

src/test/resources/conformance/manifest.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,34 @@
9393
{ "name": "absent-count", "body_attempts": 3, "approximate_receive_count": null, "expected_attempts": 3 }
9494
]
9595
}
96+
},
97+
"asb": {
98+
"description": "Azure Service Bus binding conformance (broker-bindings.md §4). Every SDK that ships an ASB transport must satisfy these. The envelope body stays byte-identical (the 'cases' above); these lock the native projection + reconciliation the binding adds. Per-message values reuse fixtures/order-created.json so the expected projection is deterministic.",
99+
"property_projection": {
100+
"description": "On produce, the transport MUST project these native Service Bus message fields from the envelope: Subject = job (the URN), CorrelationId = trace_id, MessageId = meta.id, ContentType = application/json, plus the bq- ApplicationProperties as native AMQP-typed values (numbers stay numbers, not strings). Applies to every ASB-producing SDK.",
101+
"envelope_file": "fixtures/order-created.json",
102+
"message": {
103+
"subject": "urn:babel:orders:created",
104+
"correlation_id": "7b3f9c2a-e41d-4f88-9b2a-1c0d5e6f7a8b",
105+
"message_id": "f1e2d3c4-b5a6-4789-90ab-cdef01234567",
106+
"content_type": "application/json"
107+
},
108+
"application_properties": {
109+
"bq-schema-version": 1,
110+
"bq-source-lang": "php",
111+
"bq-created-at": 1749132727000
112+
}
113+
},
114+
"attempts_reconciliation": {
115+
"description": "On consume, attempts = max(body.attempts, DeliveryCount - 1): a first delivery (DeliveryCount 1) reads 0, a runtime-incremented body count is never lowered, and DeliveryCount <= 1 leaves the body's own count untouched (the runtime retries by republishing with attempts+1). DeliveryCount is the native 1-based ASB redelivery counter; the rule is identical across the native-consumer SDKs (.NET/Java/Node) and the Transport+App SDKs (Python/Go).",
116+
"cases": [
117+
{ "name": "first-delivery", "body_attempts": 0, "delivery_count": 1, "expected_attempts": 0 },
118+
{ "name": "third-delivery", "body_attempts": 0, "delivery_count": 3, "expected_attempts": 2 },
119+
{ "name": "native-exceeds-body", "body_attempts": 2, "delivery_count": 5, "expected_attempts": 4 },
120+
{ "name": "never-lower-runtime", "body_attempts": 5, "delivery_count": 2, "expected_attempts": 5 },
121+
{ "name": "first-delivery-keeps-body", "body_attempts": 4, "delivery_count": 1, "expected_attempts": 4 },
122+
{ "name": "zero-count-keeps-body", "body_attempts": 3, "delivery_count": 0, "expected_attempts": 3 }
123+
]
124+
}
96125
}
97126
}

0 commit comments

Comments
 (0)