@amqp-contract/contract 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -3
  2. package/docs/index.md +179 -179
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -58,10 +58,8 @@ const orderCreatedEvent = defineEventPublisher(ordersExchange, orderMessage, {
58
58
  const orderQueue = defineQueue("order-processing", { durable: true });
59
59
  const analyticsQueue = defineQueue("analytics", { durable: true });
60
60
 
61
- // Compose contract - configs go directly, bindings auto-generated
61
+ // Compose contract - exchanges, queues, bindings auto-extracted
62
62
  const contract = defineContract({
63
- exchanges: { orders: ordersExchange },
64
- queues: { orderQueue, analyticsQueue },
65
63
  publishers: {
66
64
  // EventPublisherConfig → auto-extracted to publisher
67
65
  orderCreated: orderCreatedEvent,
package/docs/index.md CHANGED
@@ -12,7 +12,7 @@
12
12
  type AnySchema = StandardSchemaV1;
13
13
  ```
14
14
 
15
- Defined in: [types.ts:12](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L12)
15
+ Defined in: [types.ts:12](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L12)
16
16
 
17
17
  Any schema that conforms to Standard Schema v1.
18
18
 
@@ -32,7 +32,7 @@ https://github.com/standard-schema/standard-schema
32
32
  type BaseExchangeDefinition<TName> = object;
33
33
  ```
34
34
 
35
- Defined in: [types.ts:376](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L376)
35
+ Defined in: [types.ts:376](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L376)
36
36
 
37
37
  Base definition of an AMQP exchange.
38
38
 
@@ -49,11 +49,11 @@ type and routing rules. This type contains properties common to all exchange typ
49
49
 
50
50
  | Property | Type | Description | Defined in |
51
51
  | ------ | ------ | ------ | ------ |
52
- | <a id="arguments"></a> `arguments?` | `Record`&lt;`string`, `unknown`&gt; | Additional AMQP arguments for advanced configuration. Common arguments include alternate-exchange for handling unroutable messages. | [types.ts:405](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L405) |
53
- | <a id="autodelete"></a> `autoDelete?` | `boolean` | If true, the exchange is deleted when all queues have finished using it. **Default** `false` | [types.ts:392](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L392) |
54
- | <a id="durable"></a> `durable?` | `boolean` | If true, the exchange survives broker restarts. Durable exchanges are persisted to disk. **Default** `false` | [types.ts:386](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L386) |
55
- | <a id="internal"></a> `internal?` | `boolean` | If true, the exchange cannot be directly published to by clients. It can only receive messages from other exchanges via exchange-to-exchange bindings. **Default** `false` | [types.ts:399](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L399) |
56
- | <a id="name"></a> `name` | `TName` | The name of the exchange. Must be unique within the RabbitMQ virtual host. | [types.ts:380](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L380) |
52
+ | <a id="arguments"></a> `arguments?` | `Record`&lt;`string`, `unknown`&gt; | Additional AMQP arguments for advanced configuration. Common arguments include alternate-exchange for handling unroutable messages. | [types.ts:405](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L405) |
53
+ | <a id="autodelete"></a> `autoDelete?` | `boolean` | If true, the exchange is deleted when all queues have finished using it. **Default** `false` | [types.ts:392](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L392) |
54
+ | <a id="durable"></a> `durable?` | `boolean` | If true, the exchange survives broker restarts. Durable exchanges are persisted to disk. **Default** `false` | [types.ts:386](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L386) |
55
+ | <a id="internal"></a> `internal?` | `boolean` | If true, the exchange cannot be directly published to by clients. It can only receive messages from other exchanges via exchange-to-exchange bindings. **Default** `false` | [types.ts:399](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L399) |
56
+ | <a id="name"></a> `name` | `TName` | The name of the exchange. Must be unique within the RabbitMQ virtual host. | [types.ts:380](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L380) |
57
57
 
58
58
  ***
59
59
 
@@ -65,7 +65,7 @@ type BindingDefinition =
65
65
  | ExchangeBindingDefinition;
66
66
  ```
67
67
 
68
- Defined in: [types.ts:831](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L831)
68
+ Defined in: [types.ts:831](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L831)
69
69
 
70
70
  Union type of all binding definitions.
71
71
 
@@ -81,7 +81,7 @@ A binding can be either:
81
81
  type BindingPattern<S> = S extends "" ? never : S;
82
82
  ```
83
83
 
84
- Defined in: [builder/routing-types.ts:52](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/routing-types.ts#L52)
84
+ Defined in: [builder/routing-types.ts:52](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/routing-types.ts#L52)
85
85
 
86
86
  Type-safe binding pattern that validates basic format and wildcards.
87
87
 
@@ -116,7 +116,7 @@ type Invalid = BindingPattern<"">; // never (empty string)
116
116
  type ClassicQueueDefinition<TName> = BaseQueueDefinition<TName> & object;
117
117
  ```
118
118
 
119
- Defined in: [types.ts:595](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L595)
119
+ Defined in: [types.ts:595](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L595)
120
120
 
121
121
  Definition of a classic queue.
122
122
 
@@ -127,10 +127,10 @@ specific features not supported by quorum queues (e.g., exclusive queues, priori
127
127
 
128
128
  | Name | Type | Description | Defined in |
129
129
  | ------ | ------ | ------ | ------ |
130
- | `deliveryLimit?` | `never` | Classic queues do not support delivery limits. Use type: 'quorum' if you need native retry with delivery limits. | [types.ts:605](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L605) |
131
- | `exclusive?` | `boolean` | If true, the queue can only be used by the declaring connection and is deleted when that connection closes. Exclusive queues are private to the connection. **Default** `false` | [types.ts:612](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L612) |
132
- | `retry` | `ResolvedTtlBackoffRetryOptions` | Retry configuration for handling failed message processing. Classic queues only support TTL-backoff retry mode (default). When the queue is created, defaults are applied. | [types.ts:620](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L620) |
133
- | `type` | `"classic"` | Queue type discriminator: classic queue. | [types.ts:599](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L599) |
130
+ | `deliveryLimit?` | `never` | Classic queues do not support delivery limits. Use type: 'quorum' if you need native retry with delivery limits. | [types.ts:605](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L605) |
131
+ | `exclusive?` | `boolean` | If true, the queue can only be used by the declaring connection and is deleted when that connection closes. Exclusive queues are private to the connection. **Default** `false` | [types.ts:612](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L612) |
132
+ | `retry` | `ResolvedTtlBackoffRetryOptions` | Retry configuration for handling failed message processing. Classic queues only support TTL-backoff retry mode (default). When the queue is created, defaults are applied. | [types.ts:620](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L620) |
133
+ | `type` | `"classic"` | Queue type discriminator: classic queue. | [types.ts:599](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L599) |
134
134
 
135
135
  #### Type Parameters
136
136
 
@@ -146,7 +146,7 @@ specific features not supported by quorum queues (e.g., exclusive queues, priori
146
146
  type ClassicQueueOptions = BaseQueueOptions & object;
147
147
  ```
148
148
 
149
- Defined in: [types.ts:318](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L318)
149
+ Defined in: [types.ts:318](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L318)
150
150
 
151
151
  Options for creating a classic queue.
152
152
 
@@ -159,10 +159,10 @@ Classic queues support all traditional RabbitMQ features including:
159
159
 
160
160
  | Name | Type | Description | Defined in |
161
161
  | ------ | ------ | ------ | ------ |
162
- | `exclusive?` | `boolean` | If true, the queue can only be used by the declaring connection and is deleted when that connection closes. Exclusive queues are private to the connection. **Default** `false` | [types.ts:329](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L329) |
163
- | `maxPriority?` | `number` | Maximum priority level for priority queue (1-255, recommended: 1-10). Sets x-max-priority argument. Only supported with classic queues. | [types.ts:336](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L336) |
164
- | `retry?` | [`TtlBackoffRetryOptions`](#ttlbackoffretryoptions) | Retry configuration for handling failed message processing. Classic queues only support TTL-backoff retry mode, which uses wait queues with exponential backoff. For quorum-native retry, use quorum queues instead. **Example** `const orderQueue = defineQueue('order-processing', { type: 'classic', durable: true, deadLetter: { exchange: dlx }, retry: { maxRetries: 5, initialDelayMs: 1000, maxDelayMs: 30000, }, });` | [types.ts:358](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L358) |
165
- | `type` | `"classic"` | Queue type: classic (for special cases) | [types.ts:322](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L322) |
162
+ | `exclusive?` | `boolean` | If true, the queue can only be used by the declaring connection and is deleted when that connection closes. Exclusive queues are private to the connection. **Default** `false` | [types.ts:329](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L329) |
163
+ | `maxPriority?` | `number` | Maximum priority level for priority queue (1-255, recommended: 1-10). Sets x-max-priority argument. Only supported with classic queues. | [types.ts:336](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L336) |
164
+ | `retry?` | [`TtlBackoffRetryOptions`](#ttlbackoffretryoptions) | Retry configuration for handling failed message processing. Classic queues only support TTL-backoff retry mode, which uses wait queues with exponential backoff. For quorum-native retry, use quorum queues instead. **Example** `const orderQueue = defineQueue('order-processing', { type: 'classic', durable: true, deadLetter: { exchange: dlx }, retry: { maxRetries: 5, initialDelayMs: 1000, maxDelayMs: 30000, }, });` | [types.ts:358](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L358) |
165
+ | `type` | `"classic"` | Queue type: classic (for special cases) | [types.ts:322](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L322) |
166
166
 
167
167
  #### Example
168
168
 
@@ -182,7 +182,7 @@ const priorityQueue = defineQueue('tasks', {
182
182
  type CommandConsumerConfig<TMessage, TExchange, TRoutingKey, TQueue, TDlxExchange> = object;
183
183
  ```
184
184
 
185
- Defined in: [builder/command.ts:30](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/command.ts#L30)
185
+ Defined in: [builder/command.ts:30](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/command.ts#L30)
186
186
 
187
187
  Configuration for a command consumer.
188
188
 
@@ -203,14 +203,14 @@ The consumer "owns" the queue, and publishers send commands to it.
203
203
 
204
204
  | Property | Type | Description | Defined in |
205
205
  | ------ | ------ | ------ | ------ |
206
- | <a id="__brand"></a> `__brand` | `"CommandConsumerConfig"` | Discriminator to identify this as a command consumer config | [builder/command.ts:38](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/command.ts#L38) |
207
- | <a id="binding"></a> `binding` | [`QueueBindingDefinition`](#queuebindingdefinition) | The binding connecting the queue to the exchange | [builder/command.ts:42](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/command.ts#L42) |
208
- | <a id="consumer"></a> `consumer` | [`ConsumerDefinition`](#consumerdefinition)&lt;`TMessage`&gt; | The consumer definition for processing commands | [builder/command.ts:40](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/command.ts#L40) |
209
- | <a id="deadletterexchange"></a> `deadLetterExchange` | `TDlxExchange` | The dead letter exchange from the queue, if configured | [builder/command.ts:48](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/command.ts#L48) |
210
- | <a id="exchange"></a> `exchange` | `TExchange` | The exchange that receives commands | [builder/command.ts:44](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/command.ts#L44) |
211
- | <a id="message"></a> `message` | `TMessage` | The message definition | [builder/command.ts:50](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/command.ts#L50) |
212
- | <a id="queue"></a> `queue` | `TQueue` | The queue this consumer reads from | [builder/command.ts:46](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/command.ts#L46) |
213
- | <a id="routingkey"></a> `routingKey` | `TRoutingKey` | The routing key pattern for the binding | [builder/command.ts:52](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/command.ts#L52) |
206
+ | <a id="__brand"></a> `__brand` | `"CommandConsumerConfig"` | Discriminator to identify this as a command consumer config | [builder/command.ts:38](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/command.ts#L38) |
207
+ | <a id="binding"></a> `binding` | [`QueueBindingDefinition`](#queuebindingdefinition) | The binding connecting the queue to the exchange | [builder/command.ts:42](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/command.ts#L42) |
208
+ | <a id="consumer"></a> `consumer` | [`ConsumerDefinition`](#consumerdefinition)&lt;`TMessage`&gt; | The consumer definition for processing commands | [builder/command.ts:40](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/command.ts#L40) |
209
+ | <a id="deadletterexchange"></a> `deadLetterExchange` | `TDlxExchange` | The dead letter exchange from the queue, if configured | [builder/command.ts:48](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/command.ts#L48) |
210
+ | <a id="exchange"></a> `exchange` | `TExchange` | The exchange that receives commands | [builder/command.ts:44](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/command.ts#L44) |
211
+ | <a id="message"></a> `message` | `TMessage` | The message definition | [builder/command.ts:50](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/command.ts#L50) |
212
+ | <a id="queue"></a> `queue` | `TQueue` | The queue this consumer reads from | [builder/command.ts:46](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/command.ts#L46) |
213
+ | <a id="routingkey"></a> `routingKey` | `TRoutingKey` | The routing key pattern for the binding | [builder/command.ts:52](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/command.ts#L52) |
214
214
 
215
215
  ***
216
216
 
@@ -220,7 +220,7 @@ The consumer "owns" the queue, and publishers send commands to it.
220
220
  type CommandConsumerConfigBase = object;
221
221
  ```
222
222
 
223
- Defined in: [types.ts:928](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L928)
223
+ Defined in: [types.ts:928](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L928)
224
224
 
225
225
  Base type for command consumer configuration.
226
226
 
@@ -235,14 +235,14 @@ defineCommandConsumer for creating command consumers
235
235
 
236
236
  | Property | Type | Defined in |
237
237
  | ------ | ------ | ------ |
238
- | <a id="__brand-1"></a> `__brand` | `"CommandConsumerConfig"` | [types.ts:929](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L929) |
239
- | <a id="binding-1"></a> `binding` | [`QueueBindingDefinition`](#queuebindingdefinition) | [types.ts:931](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L931) |
240
- | <a id="consumer-1"></a> `consumer` | [`ConsumerDefinition`](#consumerdefinition) | [types.ts:930](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L930) |
241
- | <a id="deadletterexchange-1"></a> `deadLetterExchange` | [`ExchangeDefinition`](#exchangedefinition) \| `undefined` | [types.ts:934](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L934) |
242
- | <a id="exchange-1"></a> `exchange` | [`ExchangeDefinition`](#exchangedefinition) | [types.ts:932](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L932) |
243
- | <a id="message-1"></a> `message` | [`MessageDefinition`](#messagedefinition) | [types.ts:935](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L935) |
244
- | <a id="queue-1"></a> `queue` | [`QueueDefinition`](#queuedefinition) | [types.ts:933](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L933) |
245
- | <a id="routingkey-1"></a> `routingKey` | `string` \| `undefined` | [types.ts:936](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L936) |
238
+ | <a id="__brand-1"></a> `__brand` | `"CommandConsumerConfig"` | [types.ts:929](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L929) |
239
+ | <a id="binding-1"></a> `binding` | [`QueueBindingDefinition`](#queuebindingdefinition) | [types.ts:931](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L931) |
240
+ | <a id="consumer-1"></a> `consumer` | [`ConsumerDefinition`](#consumerdefinition) | [types.ts:930](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L930) |
241
+ | <a id="deadletterexchange-1"></a> `deadLetterExchange` | [`ExchangeDefinition`](#exchangedefinition) \| `undefined` | [types.ts:934](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L934) |
242
+ | <a id="exchange-1"></a> `exchange` | [`ExchangeDefinition`](#exchangedefinition) | [types.ts:932](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L932) |
243
+ | <a id="message-1"></a> `message` | [`MessageDefinition`](#messagedefinition) | [types.ts:935](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L935) |
244
+ | <a id="queue-1"></a> `queue` | [`QueueDefinition`](#queuedefinition) | [types.ts:933](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L933) |
245
+ | <a id="routingkey-1"></a> `routingKey` | `string` \| `undefined` | [types.ts:936](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L936) |
246
246
 
247
247
  ***
248
248
 
@@ -252,7 +252,7 @@ defineCommandConsumer for creating command consumers
252
252
  type CompressionAlgorithm = "gzip" | "deflate";
253
253
  ```
254
254
 
255
- Defined in: [types.ts:134](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L134)
255
+ Defined in: [types.ts:134](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L134)
256
256
 
257
257
  Supported compression algorithms for message payloads.
258
258
 
@@ -290,7 +290,7 @@ await client.publish("orderCreated", payload, {
290
290
  type ConsumerDefinition<TMessage> = object;
291
291
  ```
292
292
 
293
- Defined in: [types.ts:892](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L892)
293
+ Defined in: [types.ts:892](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L892)
294
294
 
295
295
  Definition of a message consumer.
296
296
 
@@ -318,8 +318,8 @@ const consumer: ConsumerDefinition = {
318
318
 
319
319
  | Property | Type | Description | Defined in |
320
320
  | ------ | ------ | ------ | ------ |
321
- | <a id="message-2"></a> `message` | `TMessage` | The message definition including the payload schema | [types.ts:897](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L897) |
322
- | <a id="queue-2"></a> `queue` | [`QueueDefinition`](#queuedefinition) | The queue to consume messages from | [types.ts:894](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L894) |
321
+ | <a id="message-2"></a> `message` | `TMessage` | The message definition including the payload schema | [types.ts:897](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L897) |
322
+ | <a id="queue-2"></a> `queue` | [`QueueDefinition`](#queuedefinition) | The queue to consume messages from | [types.ts:894](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L894) |
323
323
 
324
324
  ***
325
325
 
@@ -332,7 +332,7 @@ type ConsumerEntry =
332
332
  | CommandConsumerConfigBase;
333
333
  ```
334
334
 
335
- Defined in: [types.ts:1043](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1043)
335
+ Defined in: [types.ts:1043](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1043)
336
336
 
337
337
  Consumer entry that can be passed to defineContract's consumers section.
338
338
 
@@ -349,7 +349,7 @@ Can be either:
349
349
  type ContractDefinition = object;
350
350
  ```
351
351
 
352
- Defined in: [types.ts:989](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L989)
352
+ Defined in: [types.ts:989](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L989)
353
353
 
354
354
  Complete AMQP contract definition (output type).
355
355
 
@@ -388,11 +388,11 @@ const contract: ContractDefinition = {
388
388
 
389
389
  | Property | Type | Description | Defined in |
390
390
  | ------ | ------ | ------ | ------ |
391
- | <a id="bindings"></a> `bindings?` | `Record`&lt;`string`, [`BindingDefinition`](#bindingdefinition)&gt; | Named binding definitions. Bindings can be queue-to-exchange or exchange-to-exchange. | [types.ts:1009](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1009) |
392
- | <a id="consumers"></a> `consumers?` | `Record`&lt;`string`, [`ConsumerDefinition`](#consumerdefinition)&gt; | Named consumer definitions. Each key requires a corresponding handler in the TypedAmqpWorker. The handler will be fully typed based on the message schema. | [types.ts:1023](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1023) |
393
- | <a id="exchanges"></a> `exchanges?` | `Record`&lt;`string`, [`ExchangeDefinition`](#exchangedefinition)&gt; | Named exchange definitions. Each key becomes available as a named resource in the contract. | [types.ts:994](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L994) |
394
- | <a id="publishers"></a> `publishers?` | `Record`&lt;`string`, [`PublisherDefinition`](#publisherdefinition)&gt; | Named publisher definitions. Each key becomes a method on the TypedAmqpClient for publishing messages. The method will be fully typed based on the message schema. | [types.ts:1016](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1016) |
395
- | <a id="queues"></a> `queues?` | `Record`&lt;`string`, [`QueueEntry`](#queueentry)&gt; | Named queue definitions. Each key becomes available as a named resource in the contract. When a queue has TTL-backoff retry configured, pass the `QueueWithTtlBackoffInfrastructure` object returned by `defineQueue`. The wait queue and bindings will be automatically added. | [types.ts:1003](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1003) |
391
+ | <a id="bindings"></a> `bindings?` | `Record`&lt;`string`, [`BindingDefinition`](#bindingdefinition)&gt; | Named binding definitions. Bindings can be queue-to-exchange or exchange-to-exchange. | [types.ts:1009](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1009) |
392
+ | <a id="consumers"></a> `consumers?` | `Record`&lt;`string`, [`ConsumerDefinition`](#consumerdefinition)&gt; | Named consumer definitions. Each key requires a corresponding handler in the TypedAmqpWorker. The handler will be fully typed based on the message schema. | [types.ts:1023](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1023) |
393
+ | <a id="exchanges"></a> `exchanges?` | `Record`&lt;`string`, [`ExchangeDefinition`](#exchangedefinition)&gt; | Named exchange definitions. Each key becomes available as a named resource in the contract. | [types.ts:994](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L994) |
394
+ | <a id="publishers"></a> `publishers?` | `Record`&lt;`string`, [`PublisherDefinition`](#publisherdefinition)&gt; | Named publisher definitions. Each key becomes a method on the TypedAmqpClient for publishing messages. The method will be fully typed based on the message schema. | [types.ts:1016](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1016) |
395
+ | <a id="queues"></a> `queues?` | `Record`&lt;`string`, [`QueueEntry`](#queueentry)&gt; | Named queue definitions. Each key becomes available as a named resource in the contract. When a queue has TTL-backoff retry configured, pass the `QueueWithTtlBackoffInfrastructure` object returned by `defineQueue`. The wait queue and bindings will be automatically added. | [types.ts:1003](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1003) |
396
396
 
397
397
  ***
398
398
 
@@ -402,7 +402,7 @@ const contract: ContractDefinition = {
402
402
  type ContractDefinitionInput = object;
403
403
  ```
404
404
 
405
- Defined in: [types.ts:1072](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1072)
405
+ Defined in: [types.ts:1072](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1072)
406
406
 
407
407
  Contract definition input type with automatic extraction of event/command patterns.
408
408
 
@@ -434,8 +434,8 @@ defineContract - Processes this input and returns a ContractDefinition
434
434
 
435
435
  | Property | Type | Description | Defined in |
436
436
  | ------ | ------ | ------ | ------ |
437
- | <a id="consumers-1"></a> `consumers?` | `Record`&lt;`string`, [`ConsumerEntry`](#consumerentry)&gt; | Named consumer definitions. Can accept: - ConsumerDefinition from defineConsumer - EventConsumerResult from defineEventConsumer (binding auto-extracted) - CommandConsumerConfig from defineCommandConsumer (binding auto-extracted) | [types.ts:1090](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1090) |
438
- | <a id="publishers-1"></a> `publishers?` | `Record`&lt;`string`, [`PublisherEntry`](#publisherentry)&gt; | Named publisher definitions. Can accept: - PublisherDefinition from definePublisher - EventPublisherConfig from defineEventPublisher (auto-extracted to publisher) | [types.ts:1080](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1080) |
437
+ | <a id="consumers-1"></a> `consumers?` | `Record`&lt;`string`, [`ConsumerEntry`](#consumerentry)&gt; | Named consumer definitions. Can accept: - ConsumerDefinition from defineConsumer - EventConsumerResult from defineEventConsumer (binding auto-extracted) - CommandConsumerConfig from defineCommandConsumer (binding auto-extracted) | [types.ts:1090](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1090) |
438
+ | <a id="publishers-1"></a> `publishers?` | `Record`&lt;`string`, [`PublisherEntry`](#publisherentry)&gt; | Named publisher definitions. Can accept: - PublisherDefinition from definePublisher - EventPublisherConfig from defineEventPublisher (auto-extracted to publisher) | [types.ts:1080](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1080) |
439
439
 
440
440
  ***
441
441
 
@@ -445,7 +445,7 @@ defineContract - Processes this input and returns a ContractDefinition
445
445
  type ContractOutput<TContract> = object;
446
446
  ```
447
447
 
448
- Defined in: [types.ts:1299](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1299)
448
+ Defined in: [types.ts:1299](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1299)
449
449
 
450
450
  Contract output type with all resources extracted and properly typed.
451
451
 
@@ -466,11 +466,11 @@ This type represents the fully expanded contract with:
466
466
 
467
467
  | Property | Type | Defined in |
468
468
  | ------ | ------ | ------ |
469
- | <a id="bindings-1"></a> `bindings` | `TContract`\[`"consumers"`\] *extends* `Record`&lt;`string`, [`ConsumerEntry`](#consumerentry)&gt; ? `ExtractBindingsFromConsumers`&lt;`TContract`\[`"consumers"`\]&gt; : `object` | [types.ts:1312](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1312) |
470
- | <a id="consumers-2"></a> `consumers` | `TContract`\[`"consumers"`\] *extends* `Record`&lt;`string`, [`ConsumerEntry`](#consumerentry)&gt; ? `ExtractConsumerDefinitions`&lt;`TContract`\[`"consumers"`\]&gt; : `object` | [types.ts:1318](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1318) |
471
- | <a id="exchanges-1"></a> `exchanges` | `TContract`\[`"publishers"`\] *extends* `Record`&lt;`string`, [`PublisherEntry`](#publisherentry)&gt; ? `ExtractExchangesFromPublishers`&lt;`TContract`\[`"publishers"`\]&gt; : `object` & `TContract`\[`"consumers"`\] *extends* `Record`&lt;`string`, [`ConsumerEntry`](#consumerentry)&gt; ? `ExtractExchangesFromConsumers`&lt;`TContract`\[`"consumers"`\]&gt; : `object` & `TContract`\[`"consumers"`\] *extends* `Record`&lt;`string`, [`ConsumerEntry`](#consumerentry)&gt; ? `ExtractDeadLetterExchangesFromConsumers`&lt;`TContract`\[`"consumers"`\]&gt; : `object` | [types.ts:1300](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1300) |
472
- | <a id="publishers-2"></a> `publishers` | `TContract`\[`"publishers"`\] *extends* `Record`&lt;`string`, [`PublisherEntry`](#publisherentry)&gt; ? `ExtractPublisherDefinitions`&lt;`TContract`\[`"publishers"`\]&gt; : `object` | [types.ts:1315](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1315) |
473
- | <a id="queues-1"></a> `queues` | `TContract`\[`"consumers"`\] *extends* `Record`&lt;`string`, [`ConsumerEntry`](#consumerentry)&gt; ? `ExtractQueuesFromConsumers`&lt;`TContract`\[`"consumers"`\]&gt; : `object` | [types.ts:1309](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1309) |
469
+ | <a id="bindings-1"></a> `bindings` | `TContract`\[`"consumers"`\] *extends* `Record`&lt;`string`, [`ConsumerEntry`](#consumerentry)&gt; ? `ExtractBindingsFromConsumers`&lt;`TContract`\[`"consumers"`\]&gt; : `object` | [types.ts:1312](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1312) |
470
+ | <a id="consumers-2"></a> `consumers` | `TContract`\[`"consumers"`\] *extends* `Record`&lt;`string`, [`ConsumerEntry`](#consumerentry)&gt; ? `ExtractConsumerDefinitions`&lt;`TContract`\[`"consumers"`\]&gt; : `object` | [types.ts:1318](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1318) |
471
+ | <a id="exchanges-1"></a> `exchanges` | `TContract`\[`"publishers"`\] *extends* `Record`&lt;`string`, [`PublisherEntry`](#publisherentry)&gt; ? `ExtractExchangesFromPublishers`&lt;`TContract`\[`"publishers"`\]&gt; : `object` & `TContract`\[`"consumers"`\] *extends* `Record`&lt;`string`, [`ConsumerEntry`](#consumerentry)&gt; ? `ExtractExchangesFromConsumers`&lt;`TContract`\[`"consumers"`\]&gt; : `object` & `TContract`\[`"consumers"`\] *extends* `Record`&lt;`string`, [`ConsumerEntry`](#consumerentry)&gt; ? `ExtractDeadLetterExchangesFromConsumers`&lt;`TContract`\[`"consumers"`\]&gt; : `object` | [types.ts:1300](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1300) |
472
+ | <a id="publishers-2"></a> `publishers` | `TContract`\[`"publishers"`\] *extends* `Record`&lt;`string`, [`PublisherEntry`](#publisherentry)&gt; ? `ExtractPublisherDefinitions`&lt;`TContract`\[`"publishers"`\]&gt; : `object` | [types.ts:1315](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1315) |
473
+ | <a id="queues-1"></a> `queues` | `TContract`\[`"consumers"`\] *extends* `Record`&lt;`string`, [`ConsumerEntry`](#consumerentry)&gt; ? `ExtractQueuesFromConsumers`&lt;`TContract`\[`"consumers"`\]&gt; : `object` | [types.ts:1309](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1309) |
474
474
 
475
475
  ***
476
476
 
@@ -480,7 +480,7 @@ This type represents the fully expanded contract with:
480
480
  type DeadLetterConfig = object;
481
481
  ```
482
482
 
483
- Defined in: [types.ts:483](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L483)
483
+ Defined in: [types.ts:483](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L483)
484
484
 
485
485
  Configuration for dead letter exchange (DLX) on a queue.
486
486
 
@@ -492,8 +492,8 @@ or storage.
492
492
 
493
493
  | Property | Type | Description | Defined in |
494
494
  | ------ | ------ | ------ | ------ |
495
- | <a id="exchange-2"></a> `exchange` | [`ExchangeDefinition`](#exchangedefinition) | The exchange to send dead-lettered messages to. This exchange must be declared in the contract. | [types.ts:488](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L488) |
496
- | <a id="routingkey-2"></a> `routingKey?` | `string` | Optional routing key to use when forwarding messages to the dead letter exchange. If not specified, the original message routing key is used. | [types.ts:494](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L494) |
495
+ | <a id="exchange-2"></a> `exchange` | [`ExchangeDefinition`](#exchangedefinition) | The exchange to send dead-lettered messages to. This exchange must be declared in the contract. | [types.ts:488](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L488) |
496
+ | <a id="routingkey-2"></a> `routingKey?` | `string` | Optional routing key to use when forwarding messages to the dead letter exchange. If not specified, the original message routing key is used. | [types.ts:494](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L494) |
497
497
 
498
498
  ***
499
499
 
@@ -505,7 +505,7 @@ type DefineQueueOptions =
505
505
  | ClassicQueueOptions;
506
506
  ```
507
507
 
508
- Defined in: [types.ts:368](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L368)
508
+ Defined in: [types.ts:368](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L368)
509
509
 
510
510
  Options for defining a queue. Uses a discriminated union based on the `type` property
511
511
  to enforce quorum queue constraints at compile time.
@@ -521,7 +521,7 @@ to enforce quorum queue constraints at compile time.
521
521
  type DefineQuorumQueueOptions = object;
522
522
  ```
523
523
 
524
- Defined in: [builder/queue.ts:390](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L390)
524
+ Defined in: [builder/queue.ts:390](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L390)
525
525
 
526
526
  Options for creating a quorum queue with quorum-native retry.
527
527
 
@@ -533,11 +533,11 @@ This simplified helper enforces the required configuration for quorum-native ret
533
533
 
534
534
  | Property | Type | Description | Defined in |
535
535
  | ------ | ------ | ------ | ------ |
536
- | <a id="arguments-1"></a> `arguments?` | `Record`&lt;`string`, `unknown`&gt; | Additional AMQP arguments for advanced configuration. | [builder/queue.ts:417](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L417) |
537
- | <a id="autodelete-1"></a> `autoDelete?` | `boolean` | If true, the queue is deleted when the last consumer unsubscribes. **Default** `false` | [builder/queue.ts:412](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L412) |
538
- | <a id="deadletterexchange-2"></a> `deadLetterExchange` | [`ExchangeDefinition`](#exchangedefinition) | Dead letter configuration - required for retry support. Failed messages will be sent to this exchange. | [builder/queue.ts:395](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L395) |
539
- | <a id="deadletterroutingkey"></a> `deadLetterRoutingKey?` | `string` | Optional routing key for dead-lettered messages. | [builder/queue.ts:400](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L400) |
540
- | <a id="deliverylimit"></a> `deliveryLimit` | `number` | Maximum number of delivery attempts before dead-lettering. **Minimum** 1 | [builder/queue.ts:406](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L406) |
536
+ | <a id="arguments-1"></a> `arguments?` | `Record`&lt;`string`, `unknown`&gt; | Additional AMQP arguments for advanced configuration. | [builder/queue.ts:417](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L417) |
537
+ | <a id="autodelete-1"></a> `autoDelete?` | `boolean` | If true, the queue is deleted when the last consumer unsubscribes. **Default** `false` | [builder/queue.ts:412](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L412) |
538
+ | <a id="deadletterexchange-2"></a> `deadLetterExchange` | [`ExchangeDefinition`](#exchangedefinition) | Dead letter configuration - required for retry support. Failed messages will be sent to this exchange. | [builder/queue.ts:395](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L395) |
539
+ | <a id="deadletterroutingkey"></a> `deadLetterRoutingKey?` | `string` | Optional routing key for dead-lettered messages. | [builder/queue.ts:400](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L400) |
540
+ | <a id="deliverylimit"></a> `deliveryLimit` | `number` | Maximum number of delivery attempts before dead-lettering. **Minimum** 1 | [builder/queue.ts:406](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L406) |
541
541
 
542
542
  ***
543
543
 
@@ -547,7 +547,7 @@ This simplified helper enforces the required configuration for quorum-native ret
547
547
  type DefineTtlBackoffQueueOptions = object;
548
548
  ```
549
549
 
550
- Defined in: [builder/queue.ts:492](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L492)
550
+ Defined in: [builder/queue.ts:492](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L492)
551
551
 
552
552
  Options for creating a queue with TTL-backoff retry.
553
553
 
@@ -559,15 +559,15 @@ This simplified helper enforces the required configuration for TTL-backoff retry
559
559
 
560
560
  | Property | Type | Description | Defined in |
561
561
  | ------ | ------ | ------ | ------ |
562
- | <a id="arguments-2"></a> `arguments?` | `Record`&lt;`string`, `unknown`&gt; | Additional AMQP arguments for advanced configuration. | [builder/queue.ts:543](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L543) |
563
- | <a id="autodelete-2"></a> `autoDelete?` | `boolean` | If true, the queue is deleted when the last consumer unsubscribes. **Default** `false` | [builder/queue.ts:538](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L538) |
564
- | <a id="backoffmultiplier"></a> `backoffMultiplier?` | `number` | Exponential backoff multiplier. **Default** `2` | [builder/queue.ts:526](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L526) |
565
- | <a id="deadletterexchange-3"></a> `deadLetterExchange` | [`ExchangeDefinition`](#exchangedefinition) | Dead letter exchange - required for TTL-backoff retry. Used for routing messages to the wait queue and back. | [builder/queue.ts:497](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L497) |
566
- | <a id="deadletterroutingkey-1"></a> `deadLetterRoutingKey?` | `string` | Optional routing key for dead-lettered messages. | [builder/queue.ts:502](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L502) |
567
- | <a id="initialdelayms"></a> `initialDelayMs?` | `number` | Initial delay in ms before first retry. **Default** `1000` | [builder/queue.ts:514](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L514) |
568
- | <a id="jitter"></a> `jitter?` | `boolean` | Add jitter to prevent thundering herd. **Default** `true` | [builder/queue.ts:532](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L532) |
569
- | <a id="maxdelayms"></a> `maxDelayMs?` | `number` | Maximum delay in ms between retries. **Default** `30000` | [builder/queue.ts:520](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L520) |
570
- | <a id="maxretries"></a> `maxRetries?` | `number` | Maximum retry attempts before sending to DLQ. **Default** `3` | [builder/queue.ts:508](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L508) |
562
+ | <a id="arguments-2"></a> `arguments?` | `Record`&lt;`string`, `unknown`&gt; | Additional AMQP arguments for advanced configuration. | [builder/queue.ts:543](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L543) |
563
+ | <a id="autodelete-2"></a> `autoDelete?` | `boolean` | If true, the queue is deleted when the last consumer unsubscribes. **Default** `false` | [builder/queue.ts:538](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L538) |
564
+ | <a id="backoffmultiplier"></a> `backoffMultiplier?` | `number` | Exponential backoff multiplier. **Default** `2` | [builder/queue.ts:526](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L526) |
565
+ | <a id="deadletterexchange-3"></a> `deadLetterExchange` | [`ExchangeDefinition`](#exchangedefinition) | Dead letter exchange - required for TTL-backoff retry. Used for routing messages to the wait queue and back. | [builder/queue.ts:497](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L497) |
566
+ | <a id="deadletterroutingkey-1"></a> `deadLetterRoutingKey?` | `string` | Optional routing key for dead-lettered messages. | [builder/queue.ts:502](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L502) |
567
+ | <a id="initialdelayms"></a> `initialDelayMs?` | `number` | Initial delay in ms before first retry. **Default** `1000` | [builder/queue.ts:514](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L514) |
568
+ | <a id="jitter"></a> `jitter?` | `boolean` | Add jitter to prevent thundering herd. **Default** `true` | [builder/queue.ts:532](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L532) |
569
+ | <a id="maxdelayms"></a> `maxDelayMs?` | `number` | Maximum delay in ms between retries. **Default** `30000` | [builder/queue.ts:520](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L520) |
570
+ | <a id="maxretries"></a> `maxRetries?` | `number` | Maximum retry attempts before sending to DLQ. **Default** `3` | [builder/queue.ts:508](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L508) |
571
571
 
572
572
  ***
573
573
 
@@ -577,7 +577,7 @@ This simplified helper enforces the required configuration for TTL-backoff retry
577
577
  type DirectExchangeDefinition<TName> = BaseExchangeDefinition<TName> & object;
578
578
  ```
579
579
 
580
- Defined in: [types.ts:439](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L439)
580
+ Defined in: [types.ts:439](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L439)
581
581
 
582
582
  A direct exchange definition.
583
583
 
@@ -588,7 +588,7 @@ This is ideal for point-to-point messaging where each message should go to speci
588
588
 
589
589
  | Name | Type | Defined in |
590
590
  | ------ | ------ | ------ |
591
- | `type` | `"direct"` | [types.ts:441](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L441) |
591
+ | `type` | `"direct"` | [types.ts:441](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L441) |
592
592
 
593
593
  #### Type Parameters
594
594
 
@@ -612,7 +612,7 @@ const tasksExchange: DirectExchangeDefinition = defineExchange('tasks', 'direct'
612
612
  type EventConsumerResult<TMessage, TExchange, TQueue, TDlxExchange> = object;
613
613
  ```
614
614
 
615
- Defined in: [builder/event.ts:55](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L55)
615
+ Defined in: [builder/event.ts:55](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L55)
616
616
 
617
617
  Result from defineEventConsumer.
618
618
 
@@ -633,12 +633,12 @@ will be automatically extracted.
633
633
 
634
634
  | Property | Type | Description | Defined in |
635
635
  | ------ | ------ | ------ | ------ |
636
- | <a id="__brand-2"></a> `__brand` | `"EventConsumerResult"` | Discriminator to identify this as an event consumer result | [builder/event.ts:62](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L62) |
637
- | <a id="binding-2"></a> `binding` | [`QueueBindingDefinition`](#queuebindingdefinition) | The binding connecting the queue to the exchange | [builder/event.ts:66](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L66) |
638
- | <a id="consumer-2"></a> `consumer` | [`ConsumerDefinition`](#consumerdefinition)&lt;`TMessage`&gt; | The consumer definition for processing messages | [builder/event.ts:64](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L64) |
639
- | <a id="deadletterexchange-4"></a> `deadLetterExchange` | `TDlxExchange` | The dead letter exchange from the queue, if configured | [builder/event.ts:72](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L72) |
640
- | <a id="exchange-3"></a> `exchange` | `TExchange` | The exchange this consumer subscribes to | [builder/event.ts:68](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L68) |
641
- | <a id="queue-3"></a> `queue` | `TQueue` | The queue this consumer reads from | [builder/event.ts:70](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L70) |
636
+ | <a id="__brand-2"></a> `__brand` | `"EventConsumerResult"` | Discriminator to identify this as an event consumer result | [builder/event.ts:62](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L62) |
637
+ | <a id="binding-2"></a> `binding` | [`QueueBindingDefinition`](#queuebindingdefinition) | The binding connecting the queue to the exchange | [builder/event.ts:66](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L66) |
638
+ | <a id="consumer-2"></a> `consumer` | [`ConsumerDefinition`](#consumerdefinition)&lt;`TMessage`&gt; | The consumer definition for processing messages | [builder/event.ts:64](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L64) |
639
+ | <a id="deadletterexchange-4"></a> `deadLetterExchange` | `TDlxExchange` | The dead letter exchange from the queue, if configured | [builder/event.ts:72](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L72) |
640
+ | <a id="exchange-3"></a> `exchange` | `TExchange` | The exchange this consumer subscribes to | [builder/event.ts:68](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L68) |
641
+ | <a id="queue-3"></a> `queue` | `TQueue` | The queue this consumer reads from | [builder/event.ts:70](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L70) |
642
642
 
643
643
  ***
644
644
 
@@ -648,7 +648,7 @@ will be automatically extracted.
648
648
  type EventConsumerResultBase = object;
649
649
  ```
650
650
 
651
- Defined in: [types.ts:947](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L947)
651
+ Defined in: [types.ts:947](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L947)
652
652
 
653
653
  Base type for event consumer result.
654
654
 
@@ -663,12 +663,12 @@ defineEventConsumer for creating event consumers
663
663
 
664
664
  | Property | Type | Defined in |
665
665
  | ------ | ------ | ------ |
666
- | <a id="__brand-3"></a> `__brand` | `"EventConsumerResult"` | [types.ts:948](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L948) |
667
- | <a id="binding-3"></a> `binding` | [`QueueBindingDefinition`](#queuebindingdefinition) | [types.ts:950](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L950) |
668
- | <a id="consumer-3"></a> `consumer` | [`ConsumerDefinition`](#consumerdefinition) | [types.ts:949](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L949) |
669
- | <a id="deadletterexchange-5"></a> `deadLetterExchange` | [`ExchangeDefinition`](#exchangedefinition) \| `undefined` | [types.ts:953](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L953) |
670
- | <a id="exchange-4"></a> `exchange` | [`ExchangeDefinition`](#exchangedefinition) | [types.ts:951](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L951) |
671
- | <a id="queue-4"></a> `queue` | [`QueueDefinition`](#queuedefinition) | [types.ts:952](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L952) |
666
+ | <a id="__brand-3"></a> `__brand` | `"EventConsumerResult"` | [types.ts:948](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L948) |
667
+ | <a id="binding-3"></a> `binding` | [`QueueBindingDefinition`](#queuebindingdefinition) | [types.ts:950](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L950) |
668
+ | <a id="consumer-3"></a> `consumer` | [`ConsumerDefinition`](#consumerdefinition) | [types.ts:949](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L949) |
669
+ | <a id="deadletterexchange-5"></a> `deadLetterExchange` | [`ExchangeDefinition`](#exchangedefinition) \| `undefined` | [types.ts:953](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L953) |
670
+ | <a id="exchange-4"></a> `exchange` | [`ExchangeDefinition`](#exchangedefinition) | [types.ts:951](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L951) |
671
+ | <a id="queue-4"></a> `queue` | [`QueueDefinition`](#queuedefinition) | [types.ts:952](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L952) |
672
672
 
673
673
  ***
674
674
 
@@ -678,7 +678,7 @@ defineEventConsumer for creating event consumers
678
678
  type EventPublisherConfig<TMessage, TExchange, TRoutingKey> = object;
679
679
  ```
680
680
 
681
- Defined in: [builder/event.ts:29](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L29)
681
+ Defined in: [builder/event.ts:29](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L29)
682
682
 
683
683
  Configuration for an event publisher.
684
684
 
@@ -698,11 +698,11 @@ publishers broadcast events and consumers subscribe to receive them.
698
698
 
699
699
  | Property | Type | Description | Defined in |
700
700
  | ------ | ------ | ------ | ------ |
701
- | <a id="__brand-4"></a> `__brand` | `"EventPublisherConfig"` | Discriminator to identify this as an event publisher config | [builder/event.ts:35](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L35) |
702
- | <a id="arguments-3"></a> `arguments?` | `Record`&lt;`string`, `unknown`&gt; | Additional AMQP arguments | [builder/event.ts:43](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L43) |
703
- | <a id="exchange-5"></a> `exchange` | `TExchange` | The exchange to publish to | [builder/event.ts:37](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L37) |
704
- | <a id="message-3"></a> `message` | `TMessage` | The message definition | [builder/event.ts:39](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L39) |
705
- | <a id="routingkey-3"></a> `routingKey` | `TRoutingKey` | The routing key for direct/topic exchanges | [builder/event.ts:41](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L41) |
701
+ | <a id="__brand-4"></a> `__brand` | `"EventPublisherConfig"` | Discriminator to identify this as an event publisher config | [builder/event.ts:35](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L35) |
702
+ | <a id="arguments-3"></a> `arguments?` | `Record`&lt;`string`, `unknown`&gt; | Additional AMQP arguments | [builder/event.ts:43](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L43) |
703
+ | <a id="exchange-5"></a> `exchange` | `TExchange` | The exchange to publish to | [builder/event.ts:37](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L37) |
704
+ | <a id="message-3"></a> `message` | `TMessage` | The message definition | [builder/event.ts:39](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L39) |
705
+ | <a id="routingkey-3"></a> `routingKey` | `TRoutingKey` | The routing key for direct/topic exchanges | [builder/event.ts:41](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L41) |
706
706
 
707
707
  ***
708
708
 
@@ -712,7 +712,7 @@ publishers broadcast events and consumers subscribe to receive them.
712
712
  type EventPublisherConfigBase = object;
713
713
  ```
714
714
 
715
- Defined in: [types.ts:912](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L912)
715
+ Defined in: [types.ts:912](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L912)
716
716
 
717
717
  Base type for event publisher configuration.
718
718
 
@@ -727,11 +727,11 @@ defineEventPublisher for creating event publishers
727
727
 
728
728
  | Property | Type | Defined in |
729
729
  | ------ | ------ | ------ |
730
- | <a id="__brand-5"></a> `__brand` | `"EventPublisherConfig"` | [types.ts:913](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L913) |
731
- | <a id="arguments-4"></a> `arguments?` | `Record`&lt;`string`, `unknown`&gt; | [types.ts:917](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L917) |
732
- | <a id="exchange-6"></a> `exchange` | [`ExchangeDefinition`](#exchangedefinition) | [types.ts:914](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L914) |
733
- | <a id="message-4"></a> `message` | [`MessageDefinition`](#messagedefinition) | [types.ts:915](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L915) |
734
- | <a id="routingkey-4"></a> `routingKey` | `string` \| `undefined` | [types.ts:916](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L916) |
730
+ | <a id="__brand-5"></a> `__brand` | `"EventPublisherConfig"` | [types.ts:913](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L913) |
731
+ | <a id="arguments-4"></a> `arguments?` | `Record`&lt;`string`, `unknown`&gt; | [types.ts:917](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L917) |
732
+ | <a id="exchange-6"></a> `exchange` | [`ExchangeDefinition`](#exchangedefinition) | [types.ts:914](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L914) |
733
+ | <a id="message-4"></a> `message` | [`MessageDefinition`](#messagedefinition) | [types.ts:915](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L915) |
734
+ | <a id="routingkey-4"></a> `routingKey` | `string` \| `undefined` | [types.ts:916](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L916) |
735
735
 
736
736
  ***
737
737
 
@@ -750,7 +750,7 @@ type ExchangeBindingDefinition = object &
750
750
  };
751
751
  ```
752
752
 
753
- Defined in: [types.ts:795](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L795)
753
+ Defined in: [types.ts:795](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L795)
754
754
 
755
755
  Binding between two exchanges (exchange-to-exchange routing).
756
756
 
@@ -761,9 +761,9 @@ This allows for more complex routing topologies.
761
761
 
762
762
  | Name | Type | Description | Defined in |
763
763
  | ------ | ------ | ------ | ------ |
764
- | `arguments?` | `Record`&lt;`string`, `unknown`&gt; | Additional AMQP arguments for the binding. | [types.ts:805](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L805) |
765
- | `destination` | [`ExchangeDefinition`](#exchangedefinition) | The destination exchange that will receive forwarded messages | [types.ts:800](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L800) |
766
- | `type` | `"exchange"` | Discriminator indicating this is an exchange-to-exchange binding | [types.ts:797](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L797) |
764
+ | `arguments?` | `Record`&lt;`string`, `unknown`&gt; | Additional AMQP arguments for the binding. | [types.ts:805](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L805) |
765
+ | `destination` | [`ExchangeDefinition`](#exchangedefinition) | The destination exchange that will receive forwarded messages | [types.ts:800](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L800) |
766
+ | `type` | `"exchange"` | Discriminator indicating this is an exchange-to-exchange binding | [types.ts:797](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L797) |
767
767
 
768
768
  #### Example
769
769
 
@@ -788,7 +788,7 @@ type ExchangeDefinition<TName> =
788
788
  | TopicExchangeDefinition<TName>;
789
789
  ```
790
790
 
791
- Defined in: [types.ts:471](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L471)
791
+ Defined in: [types.ts:471](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L471)
792
792
 
793
793
  Union type of all exchange definitions.
794
794
 
@@ -808,7 +808,7 @@ Represents any type of AMQP exchange: fanout, direct, or topic.
808
808
  type FanoutExchangeDefinition<TName> = BaseExchangeDefinition<TName> & object;
809
809
  ```
810
810
 
811
- Defined in: [types.ts:421](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L421)
811
+ Defined in: [types.ts:421](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L421)
812
812
 
813
813
  A fanout exchange definition.
814
814
 
@@ -819,7 +819,7 @@ This is the simplest exchange type for pub/sub messaging patterns.
819
819
 
820
820
  | Name | Type | Defined in |
821
821
  | ------ | ------ | ------ |
822
- | `type` | `"fanout"` | [types.ts:423](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L423) |
822
+ | `type` | `"fanout"` | [types.ts:423](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L423) |
823
823
 
824
824
  #### Type Parameters
825
825
 
@@ -843,7 +843,7 @@ const logsExchange: FanoutExchangeDefinition = defineExchange('logs', 'fanout',
843
843
  type InferConsumerNames<TContract> = TContract["consumers"] extends Record<string, unknown> ? keyof TContract["consumers"] : never;
844
844
  ```
845
845
 
846
- Defined in: [types.ts:1356](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1356)
846
+ Defined in: [types.ts:1356](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1356)
847
847
 
848
848
  Extract consumer names from a contract.
849
849
 
@@ -875,7 +875,7 @@ type ConsumerNames = InferConsumerNames<typeof myContract>;
875
875
  type InferPublisherNames<TContract> = TContract["publishers"] extends Record<string, unknown> ? keyof TContract["publishers"] : never;
876
876
  ```
877
877
 
878
- Defined in: [types.ts:1338](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1338)
878
+ Defined in: [types.ts:1338](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1338)
879
879
 
880
880
  Extract publisher names from a contract.
881
881
 
@@ -907,7 +907,7 @@ type PublisherNames = InferPublisherNames<typeof myContract>;
907
907
  type MatchingRoutingKey<Pattern, Key> = RoutingKey<Key> extends never ? never : BindingPattern<Pattern> extends never ? never : MatchesPattern<Key, Pattern> extends true ? Key : never;
908
908
  ```
909
909
 
910
- Defined in: [builder/routing-types.ts:114](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/routing-types.ts#L114)
910
+ Defined in: [builder/routing-types.ts:114](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/routing-types.ts#L114)
911
911
 
912
912
  Validate that a routing key matches a binding pattern.
913
913
 
@@ -939,7 +939,7 @@ type InvalidKey = MatchingRoutingKey<"order.*", "user.created">; // never
939
939
  type MessageDefinition<TPayload, THeaders> = object;
940
940
  ```
941
941
 
942
- Defined in: [types.ts:711](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L711)
942
+ Defined in: [types.ts:711](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L711)
943
943
 
944
944
  Definition of a message with typed payload and optional headers.
945
945
 
@@ -954,10 +954,10 @@ Definition of a message with typed payload and optional headers.
954
954
 
955
955
  | Property | Type | Description | Defined in |
956
956
  | ------ | ------ | ------ | ------ |
957
- | <a id="description"></a> `description?` | `string` | Detailed description of the message for documentation purposes. Used in AsyncAPI specification generation. | [types.ts:737](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L737) |
958
- | <a id="headers"></a> `headers?` | `THeaders` | Optional headers schema for validating message metadata. Must be a Standard Schema v1 compatible schema. | [types.ts:725](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L725) |
959
- | <a id="payload"></a> `payload` | `TPayload` | The payload schema for validating message content. Must be a Standard Schema v1 compatible schema (Zod, Valibot, ArkType, etc.). | [types.ts:719](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L719) |
960
- | <a id="summary"></a> `summary?` | `string` | Brief description of the message for documentation purposes. Used in AsyncAPI specification generation. | [types.ts:731](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L731) |
957
+ | <a id="description"></a> `description?` | `string` | Detailed description of the message for documentation purposes. Used in AsyncAPI specification generation. | [types.ts:737](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L737) |
958
+ | <a id="headers"></a> `headers?` | `THeaders` | Optional headers schema for validating message metadata. Must be a Standard Schema v1 compatible schema. | [types.ts:725](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L725) |
959
+ | <a id="payload"></a> `payload` | `TPayload` | The payload schema for validating message content. Must be a Standard Schema v1 compatible schema (Zod, Valibot, ArkType, etc.). | [types.ts:719](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L719) |
960
+ | <a id="summary"></a> `summary?` | `string` | Brief description of the message for documentation purposes. Used in AsyncAPI specification generation. | [types.ts:731](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L731) |
961
961
 
962
962
  ***
963
963
 
@@ -976,7 +976,7 @@ type PublisherDefinition<TMessage> = object &
976
976
  };
977
977
  ```
978
978
 
979
- Defined in: [types.ts:853](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L853)
979
+ Defined in: [types.ts:853](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L853)
980
980
 
981
981
  Definition of a message publisher.
982
982
 
@@ -990,7 +990,7 @@ algorithm when calling the publish method.
990
990
 
991
991
  | Name | Type | Description | Defined in |
992
992
  | ------ | ------ | ------ | ------ |
993
- | `message` | `TMessage` | The message definition including the payload schema | [types.ts:855](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L855) |
993
+ | `message` | `TMessage` | The message definition including the payload schema | [types.ts:855](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L855) |
994
994
 
995
995
  #### Type Parameters
996
996
 
@@ -1018,7 +1018,7 @@ type PublisherEntry =
1018
1018
  | EventPublisherConfigBase;
1019
1019
  ```
1020
1020
 
1021
- Defined in: [types.ts:1033](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L1033)
1021
+ Defined in: [types.ts:1033](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L1033)
1022
1022
 
1023
1023
  Publisher entry that can be passed to defineContract's publishers section.
1024
1024
 
@@ -1043,7 +1043,7 @@ type QueueBindingDefinition = object &
1043
1043
  };
1044
1044
  ```
1045
1045
 
1046
- Defined in: [types.ts:747](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L747)
1046
+ Defined in: [types.ts:747](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L747)
1047
1047
 
1048
1048
  Binding between a queue and an exchange.
1049
1049
 
@@ -1055,9 +1055,9 @@ For fanout exchanges, no routing key is needed as all messages are broadcast.
1055
1055
 
1056
1056
  | Name | Type | Description | Defined in |
1057
1057
  | ------ | ------ | ------ | ------ |
1058
- | `arguments?` | `Record`&lt;`string`, `unknown`&gt; | Additional AMQP arguments for the binding. Can be used for advanced routing scenarios with the headers exchange type. | [types.ts:758](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L758) |
1059
- | `queue` | [`QueueDefinition`](#queuedefinition) | The queue that will receive messages | [types.ts:752](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L752) |
1060
- | `type` | `"queue"` | Discriminator indicating this is a queue-to-exchange binding | [types.ts:749](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L749) |
1058
+ | `arguments?` | `Record`&lt;`string`, `unknown`&gt; | Additional AMQP arguments for the binding. Can be used for advanced routing scenarios with the headers exchange type. | [types.ts:758](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L758) |
1059
+ | `queue` | [`QueueDefinition`](#queuedefinition) | The queue that will receive messages | [types.ts:752](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L752) |
1060
+ | `type` | `"queue"` | Discriminator indicating this is a queue-to-exchange binding | [types.ts:749](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L749) |
1061
1061
 
1062
1062
  ***
1063
1063
 
@@ -1069,7 +1069,7 @@ type QueueDefinition<TName> =
1069
1069
  | ClassicQueueDefinition<TName>;
1070
1070
  ```
1071
1071
 
1072
- Defined in: [types.ts:632](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L632)
1072
+ Defined in: [types.ts:632](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L632)
1073
1073
 
1074
1074
  Definition of an AMQP queue.
1075
1075
 
@@ -1095,7 +1095,7 @@ type QueueEntry<TName> =
1095
1095
  | QueueWithTtlBackoffInfrastructure<TName>;
1096
1096
  ```
1097
1097
 
1098
- Defined in: [types.ts:701](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L701)
1098
+ Defined in: [types.ts:701](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L701)
1099
1099
 
1100
1100
  A queue entry that can be passed to `defineContract`.
1101
1101
 
@@ -1115,7 +1115,7 @@ Can be either a plain queue definition or a queue with TTL-backoff infrastructur
1115
1115
  type QueueType = "quorum" | "classic";
1116
1116
  ```
1117
1117
 
1118
- Defined in: [types.ts:163](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L163)
1118
+ Defined in: [types.ts:163](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L163)
1119
1119
 
1120
1120
  Supported queue types in RabbitMQ.
1121
1121
 
@@ -1154,7 +1154,7 @@ const tempQueue = defineQueue('temp-queue', {
1154
1154
  type QueueWithTtlBackoffInfrastructure<TName> = object;
1155
1155
  ```
1156
1156
 
1157
- Defined in: [types.ts:662](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L662)
1157
+ Defined in: [types.ts:662](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L662)
1158
1158
 
1159
1159
  A queue with automatically generated TTL-backoff retry infrastructure.
1160
1160
 
@@ -1192,11 +1192,11 @@ const contract = defineContract({
1192
1192
 
1193
1193
  | Property | Type | Description | Defined in |
1194
1194
  | ------ | ------ | ------ | ------ |
1195
- | <a id="deadletter"></a> `deadLetter` | [`DeadLetterConfig`](#deadletterconfig) | Dead letter configuration from the main queue. Always present since TTL-backoff infrastructure requires a dead letter exchange. | [types.ts:678](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L678) |
1196
- | <a id="mainqueueretrybinding"></a> `mainQueueRetryBinding` | [`QueueBindingDefinition`](#queuebindingdefinition) | Binding that routes retried messages back to the main queue. | [types.ts:693](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L693) |
1197
- | <a id="queue-5"></a> `queue` | [`QueueDefinition`](#queuedefinition)&lt;`TName`&gt; | The main queue definition. | [types.ts:672](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L672) |
1198
- | <a id="waitqueue"></a> `waitQueue` | [`QueueDefinition`](#queuedefinition) | The wait queue for holding messages during backoff delay. | [types.ts:683](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L683) |
1199
- | <a id="waitqueuebinding"></a> `waitQueueBinding` | [`QueueBindingDefinition`](#queuebindingdefinition) | Binding that routes failed messages to the wait queue. | [types.ts:688](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L688) |
1195
+ | <a id="deadletter"></a> `deadLetter` | [`DeadLetterConfig`](#deadletterconfig) | Dead letter configuration from the main queue. Always present since TTL-backoff infrastructure requires a dead letter exchange. | [types.ts:678](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L678) |
1196
+ | <a id="mainqueueretrybinding"></a> `mainQueueRetryBinding` | [`QueueBindingDefinition`](#queuebindingdefinition) | Binding that routes retried messages back to the main queue. | [types.ts:693](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L693) |
1197
+ | <a id="queue-5"></a> `queue` | [`QueueDefinition`](#queuedefinition)&lt;`TName`&gt; | The main queue definition. | [types.ts:672](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L672) |
1198
+ | <a id="waitqueue"></a> `waitQueue` | [`QueueDefinition`](#queuedefinition) | The wait queue for holding messages during backoff delay. | [types.ts:683](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L683) |
1199
+ | <a id="waitqueuebinding"></a> `waitQueueBinding` | [`QueueBindingDefinition`](#queuebindingdefinition) | Binding that routes failed messages to the wait queue. | [types.ts:688](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L688) |
1200
1200
 
1201
1201
  ***
1202
1202
 
@@ -1206,7 +1206,7 @@ const contract = defineContract({
1206
1206
  type QuorumNativeRetryOptions = object;
1207
1207
  ```
1208
1208
 
1209
- Defined in: [types.ts:72](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L72)
1209
+ Defined in: [types.ts:72](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L72)
1210
1210
 
1211
1211
  Quorum-Native retry options using RabbitMQ's native delivery limit feature.
1212
1212
 
@@ -1226,7 +1226,7 @@ https://www.rabbitmq.com/docs/quorum-queues#poison-message-handling
1226
1226
 
1227
1227
  | Property | Type | Description | Defined in |
1228
1228
  | ------ | ------ | ------ | ------ |
1229
- | <a id="mode"></a> `mode` | `"quorum-native"` | Quorum-Native mode uses RabbitMQ's native delivery limit feature. Requires the queue to be a quorum queue with `deliveryLimit` configured. | [types.ts:77](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L77) |
1229
+ | <a id="mode"></a> `mode` | `"quorum-native"` | Quorum-Native mode uses RabbitMQ's native delivery limit feature. Requires the queue to be a quorum queue with `deliveryLimit` configured. | [types.ts:77](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L77) |
1230
1230
 
1231
1231
  ***
1232
1232
 
@@ -1236,7 +1236,7 @@ https://www.rabbitmq.com/docs/quorum-queues#poison-message-handling
1236
1236
  type QuorumQueueDefinition<TName> = BaseQueueDefinition<TName> & object;
1237
1237
  ```
1238
1238
 
1239
- Defined in: [types.ts:545](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L545)
1239
+ Defined in: [types.ts:545](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L545)
1240
1240
 
1241
1241
  Definition of a quorum queue.
1242
1242
 
@@ -1247,11 +1247,11 @@ They support native retry handling via `deliveryLimit` and both TTL-backoff and
1247
1247
 
1248
1248
  | Name | Type | Description | Defined in |
1249
1249
  | ------ | ------ | ------ | ------ |
1250
- | `deliveryLimit?` | `number` | Maximum number of delivery attempts before the message is dead-lettered. This is a quorum queue-specific feature. When a message is rejected (nacked) and requeued, RabbitMQ increments the `x-delivery-count` header. When this count reaches the delivery limit, the message is automatically dead-lettered (if DLX is configured) or dropped. **Minimum** 1 - Must be a positive integer (1 or greater) **See** https://www.rabbitmq.com/docs/quorum-queues#poison-message-handling | [types.ts:575](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L575) |
1251
- | `exclusive?` | `never` | Quorum queues do not support exclusive mode. Use type: 'classic' if you need exclusive queues. | [types.ts:555](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L555) |
1252
- | `maxPriority?` | `never` | Quorum queues do not support priority queues. Use type: 'classic' if you need priority queues. | [types.ts:561](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L561) |
1253
- | `retry` | [`ResolvedRetryOptions`](#resolvedretryoptions) | Retry configuration for handling failed message processing. Quorum queues support both: - `ttl-backoff`: Uses wait queues with exponential backoff (default) - `quorum-native`: Uses RabbitMQ's native delivery limit feature When the queue is created, defaults are applied for TTL-backoff options. | [types.ts:586](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L586) |
1254
- | `type` | `"quorum"` | Queue type discriminator: quorum queue. | [types.ts:549](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L549) |
1250
+ | `deliveryLimit?` | `number` | Maximum number of delivery attempts before the message is dead-lettered. This is a quorum queue-specific feature. When a message is rejected (nacked) and requeued, RabbitMQ increments the `x-delivery-count` header. When this count reaches the delivery limit, the message is automatically dead-lettered (if DLX is configured) or dropped. **Minimum** 1 - Must be a positive integer (1 or greater) **See** https://www.rabbitmq.com/docs/quorum-queues#poison-message-handling | [types.ts:575](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L575) |
1251
+ | `exclusive?` | `never` | Quorum queues do not support exclusive mode. Use type: 'classic' if you need exclusive queues. | [types.ts:555](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L555) |
1252
+ | `maxPriority?` | `never` | Quorum queues do not support priority queues. Use type: 'classic' if you need priority queues. | [types.ts:561](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L561) |
1253
+ | `retry` | [`ResolvedRetryOptions`](#resolvedretryoptions) | Retry configuration for handling failed message processing. Quorum queues support both: - `ttl-backoff`: Uses wait queues with exponential backoff (default) - `quorum-native`: Uses RabbitMQ's native delivery limit feature When the queue is created, defaults are applied for TTL-backoff options. | [types.ts:586](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L586) |
1254
+ | `type` | `"quorum"` | Queue type discriminator: quorum queue. | [types.ts:549](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L549) |
1255
1255
 
1256
1256
  #### Type Parameters
1257
1257
 
@@ -1267,7 +1267,7 @@ They support native retry handling via `deliveryLimit` and both TTL-backoff and
1267
1267
  type QuorumQueueOptions = BaseQueueOptions & object;
1268
1268
  ```
1269
1269
 
1270
- Defined in: [types.ts:214](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L214)
1270
+ Defined in: [types.ts:214](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L214)
1271
1271
 
1272
1272
  Options for creating a quorum queue.
1273
1273
 
@@ -1284,11 +1284,11 @@ Quorum queues provide native retry support via `deliveryLimit`:
1284
1284
 
1285
1285
  | Name | Type | Description | Defined in |
1286
1286
  | ------ | ------ | ------ | ------ |
1287
- | `deliveryLimit?` | `number` | Maximum number of delivery attempts before the message is dead-lettered. When a message is rejected (nacked) and requeued, RabbitMQ increments the `x-delivery-count` header. When this count reaches the delivery limit, the message is automatically dead-lettered (if DLX is configured) or dropped. This is a quorum queue-specific feature that provides native retry handling without the complexity of TTL-based wait queues. **Benefits over TTL-based retry:** - Simpler architecture (no wait queues needed) - No head-of-queue blocking issues (TTL only works at queue head) - Native RabbitMQ feature with atomic guarantees **Minimum** 1 - Must be a positive integer (1 or greater) **See** https://www.rabbitmq.com/docs/quorum-queues#poison-message-handling **Example** `const orderQueue = defineQueue('order-processing', { type: 'quorum', deliveryLimit: 5, // Allow up to 5 delivery attempts deadLetter: { exchange: dlx, routingKey: 'order.failed', }, });` | [types.ts:263](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L263) |
1288
- | `exclusive?` | `never` | Quorum queues do not support exclusive mode. Use type: 'classic' if you need exclusive queues. | [types.ts:224](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L224) |
1289
- | `maxPriority?` | `never` | Quorum queues do not support priority queues. Use type: 'classic' if you need priority queues. | [types.ts:230](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L230) |
1290
- | `retry?` | \| [`TtlBackoffRetryOptions`](#ttlbackoffretryoptions) \| [`QuorumNativeRetryOptions`](#quorumnativeretryoptions) | Retry configuration for handling failed message processing. Determines how the worker handles retries for consumers using this queue: - `"ttl-backoff"` (default): Uses wait queues with exponential backoff - `"quorum-native"`: Uses RabbitMQ's native delivery limit feature When using `"ttl-backoff"` mode, the core package will automatically create a wait queue (`{queueName}-wait`) and the necessary bindings. **Example** `// TTL-backoff mode with custom options const orderQueue = defineQueue('order-processing', { type: 'quorum', deadLetter: { exchange: dlx }, retry: { mode: 'ttl-backoff', maxRetries: 5, initialDelayMs: 1000, maxDelayMs: 30000, }, }); // Quorum-native mode const orderQueue = defineQueue('order-processing', { type: 'quorum', deliveryLimit: 5, deadLetter: { exchange: dlx }, retry: { mode: 'quorum-native' }, });` | [types.ts:298](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L298) |
1291
- | `type?` | `"quorum"` | Queue type: quorum (default, recommended) | [types.ts:218](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L218) |
1287
+ | `deliveryLimit?` | `number` | Maximum number of delivery attempts before the message is dead-lettered. When a message is rejected (nacked) and requeued, RabbitMQ increments the `x-delivery-count` header. When this count reaches the delivery limit, the message is automatically dead-lettered (if DLX is configured) or dropped. This is a quorum queue-specific feature that provides native retry handling without the complexity of TTL-based wait queues. **Benefits over TTL-based retry:** - Simpler architecture (no wait queues needed) - No head-of-queue blocking issues (TTL only works at queue head) - Native RabbitMQ feature with atomic guarantees **Minimum** 1 - Must be a positive integer (1 or greater) **See** https://www.rabbitmq.com/docs/quorum-queues#poison-message-handling **Example** `const orderQueue = defineQueue('order-processing', { type: 'quorum', deliveryLimit: 5, // Allow up to 5 delivery attempts deadLetter: { exchange: dlx, routingKey: 'order.failed', }, });` | [types.ts:263](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L263) |
1288
+ | `exclusive?` | `never` | Quorum queues do not support exclusive mode. Use type: 'classic' if you need exclusive queues. | [types.ts:224](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L224) |
1289
+ | `maxPriority?` | `never` | Quorum queues do not support priority queues. Use type: 'classic' if you need priority queues. | [types.ts:230](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L230) |
1290
+ | `retry?` | \| [`TtlBackoffRetryOptions`](#ttlbackoffretryoptions) \| [`QuorumNativeRetryOptions`](#quorumnativeretryoptions) | Retry configuration for handling failed message processing. Determines how the worker handles retries for consumers using this queue: - `"ttl-backoff"` (default): Uses wait queues with exponential backoff - `"quorum-native"`: Uses RabbitMQ's native delivery limit feature When using `"ttl-backoff"` mode, the core package will automatically create a wait queue (`{queueName}-wait`) and the necessary bindings. **Example** `// TTL-backoff mode with custom options const orderQueue = defineQueue('order-processing', { type: 'quorum', deadLetter: { exchange: dlx }, retry: { mode: 'ttl-backoff', maxRetries: 5, initialDelayMs: 1000, maxDelayMs: 30000, }, }); // Quorum-native mode const orderQueue = defineQueue('order-processing', { type: 'quorum', deliveryLimit: 5, deadLetter: { exchange: dlx }, retry: { mode: 'quorum-native' }, });` | [types.ts:298](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L298) |
1291
+ | `type?` | `"quorum"` | Queue type: quorum (default, recommended) | [types.ts:218](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L218) |
1292
1292
 
1293
1293
  #### Example
1294
1294
 
@@ -1310,7 +1310,7 @@ type ResolvedRetryOptions =
1310
1310
  | QuorumNativeRetryOptions;
1311
1311
  ```
1312
1312
 
1313
- Defined in: [types.ts:104](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L104)
1313
+ Defined in: [types.ts:104](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L104)
1314
1314
 
1315
1315
  Resolved retry configuration stored in queue definitions.
1316
1316
 
@@ -1326,7 +1326,7 @@ This is a discriminated union based on the `mode` field:
1326
1326
  type RoutingKey<S> = S extends "" ? never : S extends `${string}*${string}` | `${string}#${string}` ? never : S;
1327
1327
  ```
1328
1328
 
1329
- Defined in: [builder/routing-types.ts:25](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/routing-types.ts#L25)
1329
+ Defined in: [builder/routing-types.ts:25](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/routing-types.ts#L25)
1330
1330
 
1331
1331
  Type-safe routing key that validates basic format.
1332
1332
 
@@ -1360,7 +1360,7 @@ type Invalid2 = RoutingKey<"">; // never (empty string)
1360
1360
  type TopicExchangeDefinition<TName> = BaseExchangeDefinition<TName> & object;
1361
1361
  ```
1362
1362
 
1363
- Defined in: [types.ts:461](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L461)
1363
+ Defined in: [types.ts:461](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L461)
1364
1364
 
1365
1365
  A topic exchange definition.
1366
1366
 
@@ -1374,7 +1374,7 @@ Words are separated by dots (e.g., `order.created.high-value`).
1374
1374
 
1375
1375
  | Name | Type | Defined in |
1376
1376
  | ------ | ------ | ------ |
1377
- | `type` | `"topic"` | [types.ts:463](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L463) |
1377
+ | `type` | `"topic"` | [types.ts:463](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L463) |
1378
1378
 
1379
1379
  #### Type Parameters
1380
1380
 
@@ -1399,7 +1399,7 @@ const ordersExchange: TopicExchangeDefinition = defineExchange('orders', 'topic'
1399
1399
  type TtlBackoffRetryInfrastructure = object;
1400
1400
  ```
1401
1401
 
1402
- Defined in: [builder/ttl-backoff.ts:10](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/ttl-backoff.ts#L10)
1402
+ Defined in: [builder/ttl-backoff.ts:10](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/ttl-backoff.ts#L10)
1403
1403
 
1404
1404
  Result type for TTL-backoff retry infrastructure builder.
1405
1405
 
@@ -1409,9 +1409,9 @@ Contains the wait queue and bindings needed for TTL-backoff retry.
1409
1409
 
1410
1410
  | Property | Type | Description | Defined in |
1411
1411
  | ------ | ------ | ------ | ------ |
1412
- | <a id="mainqueueretrybinding-1"></a> `mainQueueRetryBinding` | [`QueueBindingDefinition`](#queuebindingdefinition) | Binding that routes retried messages back to the main queue. | [builder/ttl-backoff.ts:23](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/ttl-backoff.ts#L23) |
1413
- | <a id="waitqueue-1"></a> `waitQueue` | [`QueueDefinition`](#queuedefinition) | The wait queue for holding messages during backoff delay. This is a classic queue with a dead letter exchange pointing back to the main queue. | [builder/ttl-backoff.ts:15](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/ttl-backoff.ts#L15) |
1414
- | <a id="waitqueuebinding-1"></a> `waitQueueBinding` | [`QueueBindingDefinition`](#queuebindingdefinition) | Binding that routes failed messages to the wait queue. | [builder/ttl-backoff.ts:19](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/ttl-backoff.ts#L19) |
1412
+ | <a id="mainqueueretrybinding-1"></a> `mainQueueRetryBinding` | [`QueueBindingDefinition`](#queuebindingdefinition) | Binding that routes retried messages back to the main queue. | [builder/ttl-backoff.ts:23](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/ttl-backoff.ts#L23) |
1413
+ | <a id="waitqueue-1"></a> `waitQueue` | [`QueueDefinition`](#queuedefinition) | The wait queue for holding messages during backoff delay. This is a classic queue with a dead letter exchange pointing back to the main queue. | [builder/ttl-backoff.ts:15](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/ttl-backoff.ts#L15) |
1414
+ | <a id="waitqueuebinding-1"></a> `waitQueueBinding` | [`QueueBindingDefinition`](#queuebindingdefinition) | Binding that routes failed messages to the wait queue. | [builder/ttl-backoff.ts:19](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/ttl-backoff.ts#L19) |
1415
1415
 
1416
1416
  ***
1417
1417
 
@@ -1421,7 +1421,7 @@ Contains the wait queue and bindings needed for TTL-backoff retry.
1421
1421
  type TtlBackoffRetryOptions = object;
1422
1422
  ```
1423
1423
 
1424
- Defined in: [types.ts:27](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L27)
1424
+ Defined in: [types.ts:27](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L27)
1425
1425
 
1426
1426
  TTL-Backoff retry options for exponential backoff with configurable delays.
1427
1427
 
@@ -1435,12 +1435,12 @@ per-message TTL, then dead-lettered back to the main queue after the TTL expires
1435
1435
 
1436
1436
  | Property | Type | Description | Defined in |
1437
1437
  | ------ | ------ | ------ | ------ |
1438
- | <a id="backoffmultiplier-1"></a> `backoffMultiplier?` | `number` | Exponential backoff multiplier. **Default** `2` | [types.ts:51](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L51) |
1439
- | <a id="initialdelayms-1"></a> `initialDelayMs?` | `number` | Initial delay in ms before first retry. **Default** `1000` | [types.ts:41](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L41) |
1440
- | <a id="jitter-1"></a> `jitter?` | `boolean` | Add jitter to prevent thundering herd. **Default** `true` | [types.ts:56](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L56) |
1441
- | <a id="maxdelayms-1"></a> `maxDelayMs?` | `number` | Maximum delay in ms between retries. **Default** `30000` | [types.ts:46](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L46) |
1442
- | <a id="maxretries-1"></a> `maxRetries?` | `number` | Maximum retry attempts before sending to DLQ. **Default** `3` | [types.ts:36](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L36) |
1443
- | <a id="mode-1"></a> `mode` | `"ttl-backoff"` | TTL-Backoff mode uses wait queues with per-message TTL for exponential backoff. | [types.ts:31](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/types.ts#L31) |
1438
+ | <a id="backoffmultiplier-1"></a> `backoffMultiplier?` | `number` | Exponential backoff multiplier. **Default** `2` | [types.ts:51](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L51) |
1439
+ | <a id="initialdelayms-1"></a> `initialDelayMs?` | `number` | Initial delay in ms before first retry. **Default** `1000` | [types.ts:41](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L41) |
1440
+ | <a id="jitter-1"></a> `jitter?` | `boolean` | Add jitter to prevent thundering herd. **Default** `true` | [types.ts:56](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L56) |
1441
+ | <a id="maxdelayms-1"></a> `maxDelayMs?` | `number` | Maximum delay in ms between retries. **Default** `30000` | [types.ts:46](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L46) |
1442
+ | <a id="maxretries-1"></a> `maxRetries?` | `number` | Maximum retry attempts before sending to DLQ. **Default** `3` | [types.ts:36](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L36) |
1443
+ | <a id="mode-1"></a> `mode` | `"ttl-backoff"` | TTL-Backoff mode uses wait queues with per-message TTL for exponential backoff. | [types.ts:31](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/types.ts#L31) |
1444
1444
 
1445
1445
  ## Functions
1446
1446
 
@@ -1453,7 +1453,7 @@ function defineConsumer<TMessage>(
1453
1453
  options?): ConsumerDefinition<TMessage>;
1454
1454
  ```
1455
1455
 
1456
- Defined in: [builder/consumer.ts:121](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/consumer.ts#L121)
1456
+ Defined in: [builder/consumer.ts:121](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/consumer.ts#L121)
1457
1457
 
1458
1458
  Define a message consumer.
1459
1459
 
@@ -1538,7 +1538,7 @@ const processOrderConsumer = defineConsumer(orderQueue, orderMessage);
1538
1538
  function defineContract<TContract>(definition): ContractOutput<TContract>;
1539
1539
  ```
1540
1540
 
1541
- Defined in: [builder/contract.ts:84](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/contract.ts#L84)
1541
+ Defined in: [builder/contract.ts:84](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/contract.ts#L84)
1542
1542
 
1543
1543
  Define an AMQP contract.
1544
1544
 
@@ -1627,7 +1627,7 @@ export const contract = defineContract({
1627
1627
  function defineMessage<TPayload, THeaders>(payload, options?): MessageDefinition<TPayload, THeaders>;
1628
1628
  ```
1629
1629
 
1630
- Defined in: [builder/message.ts:39](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/message.ts#L39)
1630
+ Defined in: [builder/message.ts:39](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/message.ts#L39)
1631
1631
 
1632
1632
  Define a message definition with payload and optional headers/metadata.
1633
1633
 
@@ -1690,7 +1690,7 @@ const orderMessage = defineMessage(
1690
1690
  function defineQueue<TName, TDlx>(name, options): QueueDefinition<TName> | QueueWithTtlBackoffInfrastructure<TName> & object;
1691
1691
  ```
1692
1692
 
1693
- Defined in: [builder/queue.ts:246](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L246)
1693
+ Defined in: [builder/queue.ts:246](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L246)
1694
1694
 
1695
1695
  Define an AMQP queue.
1696
1696
 
@@ -1771,7 +1771,7 @@ function defineQueue<TName>(name, options?):
1771
1771
  | QueueWithTtlBackoffInfrastructure<TName>;
1772
1772
  ```
1773
1773
 
1774
- Defined in: [builder/queue.ts:253](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L253)
1774
+ Defined in: [builder/queue.ts:253](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L253)
1775
1775
 
1776
1776
  Define an AMQP queue.
1777
1777
 
@@ -1852,7 +1852,7 @@ const orderQueue = defineQueue('order-processing', {
1852
1852
  function defineQuorumQueue<TName>(name, options): QuorumQueueDefinition<TName>;
1853
1853
  ```
1854
1854
 
1855
- Defined in: [builder/queue.ts:456](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L456)
1855
+ Defined in: [builder/queue.ts:456](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L456)
1856
1856
 
1857
1857
  Create a quorum queue with quorum-native retry.
1858
1858
 
@@ -1915,7 +1915,7 @@ const contract = defineContract({
1915
1915
  function defineTtlBackoffQueue<TName>(name, options): QueueWithTtlBackoffInfrastructure<TName>;
1916
1916
  ```
1917
1917
 
1918
- Defined in: [builder/queue.ts:594](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L594)
1918
+ Defined in: [builder/queue.ts:594](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L594)
1919
1919
 
1920
1920
  Create a queue with TTL-backoff retry (exponential backoff).
1921
1921
 
@@ -1990,7 +1990,7 @@ const queueName = extractQueue(orderQueue).name;
1990
1990
  function defineTtlBackoffRetryInfrastructure(queueEntry, options?): TtlBackoffRetryInfrastructure;
1991
1991
  ```
1992
1992
 
1993
- Defined in: [builder/ttl-backoff.ts:68](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/ttl-backoff.ts#L68)
1993
+ Defined in: [builder/ttl-backoff.ts:68](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/ttl-backoff.ts#L68)
1994
1994
 
1995
1995
  Create TTL-backoff retry infrastructure for a queue.
1996
1996
 
@@ -2054,7 +2054,7 @@ const retryInfra = defineTtlBackoffRetryInfrastructure(orderQueue);
2054
2054
  function extractConsumer(entry): ConsumerDefinition;
2055
2055
  ```
2056
2056
 
2057
- Defined in: [builder/consumer.ts:55](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/consumer.ts#L55)
2057
+ Defined in: [builder/consumer.ts:55](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/consumer.ts#L55)
2058
2058
 
2059
2059
  Extract the ConsumerDefinition from any ConsumerEntry type.
2060
2060
 
@@ -2103,7 +2103,7 @@ extractConsumer(consumer3).queue.name; // "my-queue"
2103
2103
  function extractQueue<T>(entry): ExtractQueueFromEntry<T>;
2104
2104
  ```
2105
2105
 
2106
- Defined in: [builder/queue.ts:127](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L127)
2106
+ Defined in: [builder/queue.ts:127](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L127)
2107
2107
 
2108
2108
  Extract the plain QueueDefinition from a QueueEntry.
2109
2109
 
@@ -2178,7 +2178,7 @@ console.log(queueDef.deadLetter); // { exchange: dlx, ... }
2178
2178
  function isCommandConsumerConfig(value): value is CommandConsumerConfig<MessageDefinition, ExchangeDefinition, string | undefined, QueueDefinition, ExchangeDefinition | undefined>;
2179
2179
  ```
2180
2180
 
2181
- Defined in: [builder/command.ts:316](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/command.ts#L316)
2181
+ Defined in: [builder/command.ts:316](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/command.ts#L316)
2182
2182
 
2183
2183
  Type guard to check if a value is a CommandConsumerConfig.
2184
2184
 
@@ -2202,7 +2202,7 @@ True if the value is a CommandConsumerConfig
2202
2202
  function isEventConsumerResult(value): value is EventConsumerResult<MessageDefinition, ExchangeDefinition, QueueDefinition, ExchangeDefinition | undefined>;
2203
2203
  ```
2204
2204
 
2205
- Defined in: [builder/event.ts:383](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L383)
2205
+ Defined in: [builder/event.ts:383](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L383)
2206
2206
 
2207
2207
  Type guard to check if a value is an EventConsumerResult.
2208
2208
 
@@ -2226,7 +2226,7 @@ True if the value is an EventConsumerResult
2226
2226
  function isEventPublisherConfig(value): value is EventPublisherConfig<MessageDefinition, ExchangeDefinition, string | undefined>;
2227
2227
  ```
2228
2228
 
2229
- Defined in: [builder/event.ts:366](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/event.ts#L366)
2229
+ Defined in: [builder/event.ts:366](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/event.ts#L366)
2230
2230
 
2231
2231
  Type guard to check if a value is an EventPublisherConfig.
2232
2232
 
@@ -2250,7 +2250,7 @@ True if the value is an EventPublisherConfig
2250
2250
  function isQueueWithTtlBackoffInfrastructure(entry): entry is QueueWithTtlBackoffInfrastructure;
2251
2251
  ```
2252
2252
 
2253
- Defined in: [builder/queue.ts:68](https://github.com/btravers/amqp-contract/blob/a7c4b48f76ed6c3c5c7a9d457229c7ba475af3b1/packages/contract/src/builder/queue.ts#L68)
2253
+ Defined in: [builder/queue.ts:68](https://github.com/btravers/amqp-contract/blob/14b3465c61d25678b908341226a86fc481470ac6/packages/contract/src/builder/queue.ts#L68)
2254
2254
 
2255
2255
  Type guard to check if a queue entry is a QueueWithTtlBackoffInfrastructure.
2256
2256
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amqp-contract/contract",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "Contract builder for amqp-contract",
5
5
  "keywords": [
6
6
  "amqp",