@amqp-contract/contract 0.10.0 → 0.12.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/builder.ts"],"sourcesContent":[],"mappings":";;;;;;AAWA;AA8BA;AAQA;AA6CA;AAiBA;AAqBA;AASA;AACI,KAnIQ,SAAA,GAAY,gBAmIpB;;;;AAWJ;AAoBA;AA4EA;;;;;;;;AAoCA;;;;;;;AAgDA;;;;;;;AAoCA;AAsBY,KA9VA,oBAAA,GA8VmB,MAAA,GAAA,SAAA;;;;;;;AAeS,KArW5B,sBAAA,GAqW4B;EAwB5B;;;EAEH,IAAA,EAAA,MAAA;EAGE;;AAoCX;;EAKc,OAAA,CAAA,EAAA,OAAA;EAMY;;;;EAaI,UAAA,CAAA,EAAA,OAAA;EAAf;;;;AAyBf;EAAkD,QAAA,CAAA,EAAA,OAAA;EAChD;;;;EAiBU,SAAA,CAAA,EA5cE,MA4cF,CAAA,MAAkB,EAAA,OAAA,CAAA;CAAmB;;;;;;;;ACpfjD;;;;;AA4BA;AAGiB,KDyBL,wBAAA,GAA2B,sBCzBtB,GAAA;EAAL,IAAA,EAAA,QAAA;CACT;;AAyBH;;;;;AA0EA;;;;;AAkEA;;AAEoC,KD9HxB,wBAAA,GAA2B,sBC8HH,GAAA;EAAjB,IAAA,EAAA,QAAA;CAER;;;;;;AAiCX;;;;;;;;;;;AA2CA;AACS,KDxLG,uBAAA,GAA0B,sBCwL7B,GAAA;EACG,IAAA,EAAA,OAAA;CAA2B;;;;;;AASrC,KDzLU,kBAAA,GACR,wBCwLF,GDvLE,wBCuLF,GDtLE,uBCsLF;;;;;AA8DF;;;AAIY,KD/OA,gBAAA,GC+OA;EAAqC;;;;EAGD,QAAA,ED7OpC,kBC6OoC;EAA7C;;AA0BH;;EAEU,UAAA,CAAA,EAAA,MAAA;CAA2B;;;;;;;AAUzB,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G,kCACD;cAEK,eAAe;cACf;IAEb,kCACD,UACA,mBAAmB,WACnB,QAAQ;YAAoC"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/builder/exchange.ts","../src/builder/message.ts","../src/builder/queue.ts","../src/builder/binding.ts","../src/builder/publisher.ts","../src/builder/consumer.ts","../src/builder/contract.ts","../src/builder/routing-types.ts","../src/builder/publisher-first.ts","../src/builder/consumer-first.ts","../src/builder/ttl-backoff.ts"],"sourcesContent":[],"mappings":";;;;;;AAWA;AAeA;AA6CA;AAgBA;AAgBA;AA8BA;AA6BA;AAKK,KA5JO,SAAA,GAAY,gBA6KT;AA6Bf;;;;;AAwGA;AAkDA;AAQA;AA6CA;AAiBY,KA3ZA,sBAAA,GA2ZwB;EAqBxB;AASZ;;EAEI,IAAA,EAAA,aAAA;EACA;;AASJ;AAYE;EAkDU,UAAA,CAAA,EAAA,MAAA;EAkDA;AAqCZ;AAyBA;;EAea,cAAA,CAAA,EAAA,MAAA;EAKO;;;AAapB;EAQY,UAAA,CAAA,EAAA,MAAA;EACO;;;;EAOR,iBAAA,CAAA,EAAA,MAAA;EAMC;;AAsBZ;;EAWc,MAAA,CAAA,EAAA,OAAA;CAIE;;;;AAiChB;;;;;;;AAoCA;AAsBA;;AAAqE,KA7vBzD,wBAAA,GA6vByD;EAE1D;;;;EAa6B,IAAA,EAAA,eAAA;AAwBxC,CAAA;;;;;;AAyCA;;;AAc0B,KA30Bd,8BAAA,GA20Bc;EAAf,IAAA,EAAA,aAAA;EAMiB,UAAA,EAAA,MAAA;EAAf,cAAA,EAAA,MAAA;EAOiB,UAAA,EAAA,MAAA;EAAf,iBAAA,EAAA,MAAA;EAOc,MAAA,EAAA,OAAA;CAAf;;AAkBd;;;;;;AAkBY,KAn3BA,oBAAA,GAAuB,8BAm3BL,GAn3BsC,wBAm3BtC;;;;;;;;;AC57B9B;;;;;AA4BA;;;;;AA6BA;;;;;;;;ACjDA;;AAEoC,KF6FxB,oBAAA,G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4 @@
1
- //#region src/builder.ts
1
+ //#region src/builder/exchange.ts
2
2
  /**
3
3
  * Define an AMQP exchange.
4
4
  *
@@ -19,67 +19,9 @@ function defineExchange(name, type, options) {
19
19
  ...options
20
20
  };
21
21
  }
22
- /**
23
- * Define an AMQP queue.
24
- *
25
- * A queue stores messages until they are consumed by workers. Queues can be bound to exchanges
26
- * to receive messages based on routing rules.
27
- *
28
- * @param name - The name of the queue
29
- * @param options - Optional queue configuration
30
- * @param options.durable - If true, the queue survives broker restarts (default: false)
31
- * @param options.exclusive - If true, the queue can only be used by the declaring connection (default: false)
32
- * @param options.autoDelete - If true, the queue is deleted when the last consumer unsubscribes (default: false)
33
- * @param options.deadLetter - Dead letter configuration for handling failed messages
34
- * @param options.maxPriority - Maximum priority level for priority queue (1-255, recommended: 1-10). Sets x-max-priority argument.
35
- * @param options.arguments - Additional AMQP arguments (e.g., x-message-ttl)
36
- * @returns A queue definition
37
- *
38
- * @example
39
- * ```typescript
40
- * // Basic queue
41
- * const orderQueue = defineQueue('order-processing', {
42
- * durable: true,
43
- * });
44
- *
45
- * // Priority queue with max priority of 10
46
- * const taskQueue = defineQueue('urgent-tasks', {
47
- * durable: true,
48
- * maxPriority: 10,
49
- * });
50
- *
51
- * // Queue with dead letter exchange
52
- * const dlx = defineExchange('orders-dlx', 'topic', { durable: true });
53
- * const orderQueueWithDLX = defineQueue('order-processing', {
54
- * durable: true,
55
- * deadLetter: {
56
- * exchange: dlx,
57
- * routingKey: 'order.failed'
58
- * },
59
- * arguments: {
60
- * 'x-message-ttl': 86400000, // 24 hours
61
- * }
62
- * });
63
- * ```
64
- */
65
- function defineQueue(name, options) {
66
- const { maxPriority, ...queueOptions } = options ?? {};
67
- if (maxPriority !== void 0) {
68
- if (maxPriority < 1 || maxPriority > 255) throw new Error(`Invalid maxPriority: ${maxPriority}. Must be between 1 and 255. Recommended range: 1-10.`);
69
- return {
70
- name,
71
- ...queueOptions,
72
- arguments: {
73
- ...queueOptions.arguments,
74
- "x-max-priority": maxPriority
75
- }
76
- };
77
- }
78
- return {
79
- name,
80
- ...queueOptions
81
- };
82
- }
22
+
23
+ //#endregion
24
+ //#region src/builder/message.ts
83
25
  /**
84
26
  * Define a message definition with payload and optional headers/metadata.
85
27
  *
@@ -121,33 +63,63 @@ function defineMessage(payload, options) {
121
63
  ...options
122
64
  };
123
65
  }
66
+
67
+ //#endregion
68
+ //#region src/builder/binding.ts
69
+ /**
70
+ * Type guard to check if a queue entry is a QueueWithTtlBackoffInfrastructure.
71
+ * Duplicated here to avoid circular dependency with queue.ts.
72
+ * @internal
73
+ */
74
+ function isQueueWithTtlBackoffInfrastructure$1(entry) {
75
+ return typeof entry === "object" && entry !== null && "__brand" in entry && entry.__brand === "QueueWithTtlBackoffInfrastructure";
76
+ }
77
+ /**
78
+ * Extract the plain QueueDefinition from a QueueEntry.
79
+ * Duplicated here to avoid circular dependency with queue.ts.
80
+ * @internal
81
+ */
82
+ function extractQueueInternal(entry) {
83
+ if (isQueueWithTtlBackoffInfrastructure$1(entry)) return entry.queue;
84
+ return entry;
85
+ }
124
86
  /**
125
87
  * Define a binding between a queue and an exchange.
126
88
  *
127
89
  * This is the implementation function - use the type-specific overloads for better type safety.
128
90
  *
129
- * @param queue - The queue definition to bind
91
+ * @param queue - The queue definition or queue with infrastructure to bind
130
92
  * @param exchange - The exchange definition
131
93
  * @param options - Optional binding configuration
132
94
  * @returns A queue binding definition
133
95
  * @internal
134
96
  */
135
97
  function defineQueueBinding(queue, exchange, options) {
98
+ const queueDef = extractQueueInternal(queue);
136
99
  if (exchange.type === "fanout") return {
137
100
  type: "queue",
138
- queue,
101
+ queue: queueDef,
139
102
  exchange,
140
103
  ...options?.arguments && { arguments: options.arguments }
141
104
  };
142
105
  return {
143
106
  type: "queue",
144
- queue,
107
+ queue: queueDef,
145
108
  exchange,
146
109
  routingKey: options?.routingKey,
147
110
  ...options?.arguments && { arguments: options.arguments }
148
111
  };
149
112
  }
150
113
  /**
114
+ * Internal helper to call defineQueueBinding with proper type handling.
115
+ * Used by queue.ts to avoid circular dependency.
116
+ * @internal
117
+ */
118
+ function defineQueueBindingInternal(queue, exchange, options) {
119
+ if (exchange.type === "fanout") return defineQueueBinding(queue, exchange, options);
120
+ return defineQueueBinding(queue, exchange, options);
121
+ }
122
+ /**
151
123
  * Define a binding between two exchanges (exchange-to-exchange routing).
152
124
  *
153
125
  * This is the implementation function - use the type-specific overloads for better type safety.
@@ -173,6 +145,185 @@ function defineExchangeBinding(destination, source, options) {
173
145
  ...options?.arguments && { arguments: options.arguments }
174
146
  };
175
147
  }
148
+
149
+ //#endregion
150
+ //#region src/builder/queue.ts
151
+ /**
152
+ * Resolve TTL-backoff retry options with defaults applied.
153
+ * @internal
154
+ */
155
+ function resolveTtlBackoffOptions(options) {
156
+ return {
157
+ mode: "ttl-backoff",
158
+ maxRetries: options?.maxRetries ?? 3,
159
+ initialDelayMs: options?.initialDelayMs ?? 1e3,
160
+ maxDelayMs: options?.maxDelayMs ?? 3e4,
161
+ backoffMultiplier: options?.backoffMultiplier ?? 2,
162
+ jitter: options?.jitter ?? true
163
+ };
164
+ }
165
+ /**
166
+ * Type guard to check if a queue entry is a QueueWithTtlBackoffInfrastructure.
167
+ * @internal
168
+ */
169
+ function isQueueWithTtlBackoffInfrastructure(entry) {
170
+ return typeof entry === "object" && entry !== null && "__brand" in entry && entry.__brand === "QueueWithTtlBackoffInfrastructure";
171
+ }
172
+ /**
173
+ * Extract the plain QueueDefinition from a QueueEntry.
174
+ * If the entry is a QueueWithTtlBackoffInfrastructure, returns the inner queue.
175
+ * Otherwise, returns the entry as-is.
176
+ *
177
+ * @param entry - The queue entry (either plain QueueDefinition or QueueWithTtlBackoffInfrastructure)
178
+ * @returns The plain QueueDefinition
179
+ *
180
+ * @example
181
+ * ```typescript
182
+ * const queue = defineQueue('orders', { retry: { mode: 'ttl-backoff' }, deadLetter: { exchange: dlx } });
183
+ * const plainQueue = extractQueue(queue); // Returns the inner QueueDefinition
184
+ * ```
185
+ */
186
+ function extractQueue(entry) {
187
+ if (isQueueWithTtlBackoffInfrastructure(entry)) return entry.queue;
188
+ return entry;
189
+ }
190
+ /**
191
+ * Wrap a queue definition with TTL-backoff retry infrastructure.
192
+ * @internal
193
+ */
194
+ function wrapWithTtlBackoffInfrastructure(queue) {
195
+ if (!queue.deadLetter) throw new Error(`Queue "${queue.name}" does not have a dead letter exchange configured. TTL-backoff retry requires deadLetter to be set on the queue.`);
196
+ const dlx = queue.deadLetter.exchange;
197
+ const waitQueueName = `${queue.name}-wait`;
198
+ const waitQueue = {
199
+ name: waitQueueName,
200
+ type: "quorum",
201
+ durable: queue.durable ?? true,
202
+ deadLetter: {
203
+ exchange: dlx,
204
+ routingKey: queue.name
205
+ },
206
+ retry: resolveTtlBackoffOptions(void 0)
207
+ };
208
+ return {
209
+ __brand: "QueueWithTtlBackoffInfrastructure",
210
+ queue,
211
+ waitQueue,
212
+ waitQueueBinding: defineQueueBindingInternal(waitQueue, dlx, { routingKey: waitQueueName }),
213
+ mainQueueRetryBinding: defineQueueBindingInternal(queue, dlx, { routingKey: queue.name })
214
+ };
215
+ }
216
+ /**
217
+ * Define an AMQP queue.
218
+ *
219
+ * A queue stores messages until they are consumed by workers. Queues can be bound to exchanges
220
+ * to receive messages based on routing rules.
221
+ *
222
+ * By default, queues are created as quorum queues which provide better durability and
223
+ * high-availability. Use `type: 'classic'` for special cases like non-durable queues
224
+ * or priority queues.
225
+ *
226
+ * @param name - The name of the queue
227
+ * @param options - Optional queue configuration
228
+ * @param options.type - Queue type: 'quorum' (default, recommended) or 'classic'
229
+ * @param options.durable - If true, the queue survives broker restarts. Quorum queues are always durable.
230
+ * @param options.exclusive - If true, the queue can only be used by the declaring connection. Only supported with classic queues.
231
+ * @param options.autoDelete - If true, the queue is deleted when the last consumer unsubscribes (default: false)
232
+ * @param options.deadLetter - Dead letter configuration for handling failed messages
233
+ * @param options.maxPriority - Maximum priority level for priority queue (1-255, recommended: 1-10). Only supported with classic queues.
234
+ * @param options.arguments - Additional AMQP arguments (e.g., x-message-ttl)
235
+ * @returns A queue definition
236
+ *
237
+ * @example
238
+ * ```typescript
239
+ * // Quorum queue (default, recommended for production)
240
+ * const orderQueue = defineQueue('order-processing');
241
+ *
242
+ * // Explicit quorum queue with dead letter exchange
243
+ * const dlx = defineExchange('orders-dlx', 'topic', { durable: true });
244
+ * const orderQueueWithDLX = defineQueue('order-processing', {
245
+ * type: 'quorum',
246
+ * deadLetter: {
247
+ * exchange: dlx,
248
+ * routingKey: 'order.failed'
249
+ * },
250
+ * arguments: {
251
+ * 'x-message-ttl': 86400000, // 24 hours
252
+ * }
253
+ * });
254
+ *
255
+ * // Classic queue (for special cases)
256
+ * const tempQueue = defineQueue('temp-queue', {
257
+ * type: 'classic',
258
+ * durable: false,
259
+ * autoDelete: true,
260
+ * });
261
+ *
262
+ * // Priority queue (requires classic type)
263
+ * const taskQueue = defineQueue('urgent-tasks', {
264
+ * type: 'classic',
265
+ * durable: true,
266
+ * maxPriority: 10,
267
+ * });
268
+ *
269
+ * // Queue with TTL-backoff retry (returns infrastructure automatically)
270
+ * const dlx = defineExchange('orders-dlx', 'direct', { durable: true });
271
+ * const orderQueue = defineQueue('order-processing', {
272
+ * deadLetter: { exchange: dlx },
273
+ * retry: { mode: 'ttl-backoff', maxRetries: 5 },
274
+ * });
275
+ * // orderQueue is QueueWithTtlBackoffInfrastructure, pass directly to defineContract
276
+ * ```
277
+ */
278
+ function defineQueue(name, options) {
279
+ const opts = options ?? {};
280
+ const type = opts.type ?? "quorum";
281
+ const baseProps = { name };
282
+ if (opts.durable !== void 0) baseProps.durable = opts.durable;
283
+ if (opts.autoDelete !== void 0) baseProps.autoDelete = opts.autoDelete;
284
+ if (opts.deadLetter !== void 0) baseProps.deadLetter = opts.deadLetter;
285
+ if (opts.arguments !== void 0) baseProps.arguments = opts.arguments;
286
+ if (type === "quorum") {
287
+ const quorumOpts = opts;
288
+ const inputRetry = quorumOpts.retry ?? { mode: "ttl-backoff" };
289
+ if (inputRetry.mode === "quorum-native") {
290
+ if (quorumOpts.deliveryLimit === void 0) throw new Error(`Queue "${name}" uses quorum-native retry mode but deliveryLimit is not configured. Quorum-native retry requires deliveryLimit to be set.`);
291
+ }
292
+ const retry$1 = inputRetry.mode === "quorum-native" ? inputRetry : resolveTtlBackoffOptions(inputRetry);
293
+ const queueDefinition$1 = {
294
+ ...baseProps,
295
+ type: "quorum",
296
+ retry: retry$1
297
+ };
298
+ if (quorumOpts.deliveryLimit !== void 0) {
299
+ if (quorumOpts.deliveryLimit < 1 || !Number.isInteger(quorumOpts.deliveryLimit)) throw new Error(`Invalid deliveryLimit: ${quorumOpts.deliveryLimit}. Must be a positive integer.`);
300
+ queueDefinition$1.deliveryLimit = quorumOpts.deliveryLimit;
301
+ }
302
+ if (retry$1.mode === "ttl-backoff" && queueDefinition$1.deadLetter) return wrapWithTtlBackoffInfrastructure(queueDefinition$1);
303
+ return queueDefinition$1;
304
+ }
305
+ const classicOpts = opts;
306
+ if (classicOpts.retry?.mode === "quorum-native") throw new Error(`Queue "${name}" uses quorum-native retry mode but is a classic queue. Quorum-native retry requires quorum queues (type: "quorum").`);
307
+ const retry = resolveTtlBackoffOptions(classicOpts.retry);
308
+ const queueDefinition = {
309
+ ...baseProps,
310
+ type: "classic",
311
+ retry
312
+ };
313
+ if (classicOpts.exclusive !== void 0) queueDefinition.exclusive = classicOpts.exclusive;
314
+ if (classicOpts.maxPriority !== void 0) {
315
+ if (classicOpts.maxPriority < 1 || classicOpts.maxPriority > 255) throw new Error(`Invalid maxPriority: ${classicOpts.maxPriority}. Must be between 1 and 255. Recommended range: 1-10.`);
316
+ queueDefinition.arguments = {
317
+ ...queueDefinition.arguments,
318
+ "x-max-priority": classicOpts.maxPriority
319
+ };
320
+ }
321
+ if (retry.mode === "ttl-backoff" && queueDefinition.deadLetter) return wrapWithTtlBackoffInfrastructure(queueDefinition);
322
+ return queueDefinition;
323
+ }
324
+
325
+ //#endregion
326
+ //#region src/builder/publisher.ts
176
327
  /**
177
328
  * Define a message publisher.
178
329
  *
@@ -196,6 +347,18 @@ function definePublisher(exchange, message, options) {
196
347
  };
197
348
  }
198
349
  /**
350
+ * Helper to call definePublisher with proper type handling.
351
+ * Type safety is enforced by overloaded public function signatures.
352
+ * @internal
353
+ */
354
+ function definePublisherInternal(exchange, message, options) {
355
+ if (exchange.type === "fanout") return definePublisher(exchange, message, options);
356
+ return definePublisher(exchange, message, options);
357
+ }
358
+
359
+ //#endregion
360
+ //#region src/builder/consumer.ts
361
+ /**
199
362
  * Define a message consumer.
200
363
  *
201
364
  * A consumer receives and processes messages from a queue. The message schema is validated
@@ -239,11 +402,14 @@ function definePublisher(exchange, message, options) {
239
402
  */
240
403
  function defineConsumer(queue, message, options) {
241
404
  return {
242
- queue,
405
+ queue: extractQueue(queue),
243
406
  message,
244
407
  ...options
245
408
  };
246
409
  }
410
+
411
+ //#endregion
412
+ //#region src/builder/contract.ts
247
413
  /**
248
414
  * Define an AMQP contract.
249
415
  *
@@ -314,35 +480,44 @@ function defineConsumer(queue, message, options) {
314
480
  * ```
315
481
  */
316
482
  function defineContract(definition) {
317
- return definition;
318
- }
319
- /**
320
- * Helper to call definePublisher with proper type handling.
321
- * Type safety is enforced by overloaded public function signatures.
322
- * @internal
323
- */
324
- function callDefinePublisher(exchange, message, options) {
325
- if (exchange.type === "fanout") return definePublisher(exchange, message, options);
326
- return definePublisher(exchange, message, options);
327
- }
328
- /**
329
- * Helper to call defineQueueBinding with proper type handling.
330
- * Type safety is enforced by overloaded public function signatures.
331
- * @internal
332
- */
333
- function callDefineQueueBinding(queue, exchange, options) {
334
- if (exchange.type === "fanout") return defineQueueBinding(queue, exchange, options);
335
- return defineQueueBinding(queue, exchange, options);
483
+ if (!definition.queues || Object.keys(definition.queues).length === 0) return definition;
484
+ const queues = definition.queues;
485
+ const expandedQueues = {};
486
+ const autoBindings = {};
487
+ for (const [name, entry] of Object.entries(queues)) if (isQueueWithTtlBackoffInfrastructure(entry)) {
488
+ expandedQueues[name] = entry.queue;
489
+ expandedQueues[`${name}Wait`] = entry.waitQueue;
490
+ autoBindings[`${name}WaitBinding`] = entry.waitQueueBinding;
491
+ autoBindings[`${name}RetryBinding`] = entry.mainQueueRetryBinding;
492
+ } else expandedQueues[name] = entry;
493
+ if (Object.keys(autoBindings).length > 0) {
494
+ const mergedBindings = {
495
+ ...definition.bindings,
496
+ ...autoBindings
497
+ };
498
+ return {
499
+ ...definition,
500
+ queues: expandedQueues,
501
+ bindings: mergedBindings
502
+ };
503
+ }
504
+ return {
505
+ ...definition,
506
+ queues: expandedQueues
507
+ };
336
508
  }
509
+
510
+ //#endregion
511
+ //#region src/builder/publisher-first.ts
337
512
  /**
338
513
  * Implementation of definePublisherFirst.
339
514
  * @internal
340
515
  */
341
516
  function definePublisherFirst(exchange, message, options) {
342
- const publisher = callDefinePublisher(exchange, message, options);
517
+ const publisher = definePublisherInternal(exchange, message, options);
343
518
  if (exchange.type === "topic") {
344
519
  const createConsumer$1 = (queue, routingKey) => {
345
- const binding = callDefineQueueBinding(queue, exchange, routingKey ? {
520
+ const binding = defineQueueBindingInternal(queue, exchange, routingKey ? {
346
521
  ...options,
347
522
  routingKey
348
523
  } : options);
@@ -357,7 +532,7 @@ function definePublisherFirst(exchange, message, options) {
357
532
  };
358
533
  }
359
534
  const createConsumer = (queue) => {
360
- const binding = callDefineQueueBinding(queue, exchange, options);
535
+ const binding = defineQueueBindingInternal(queue, exchange, options);
361
536
  return {
362
537
  consumer: defineConsumer(queue, message),
363
538
  binding
@@ -368,16 +543,19 @@ function definePublisherFirst(exchange, message, options) {
368
543
  createConsumer
369
544
  };
370
545
  }
546
+
547
+ //#endregion
548
+ //#region src/builder/consumer-first.ts
371
549
  /**
372
550
  * Implementation of defineConsumerFirst.
373
551
  * @internal
374
552
  */
375
553
  function defineConsumerFirst(queue, exchange, message, options) {
376
554
  const consumer = defineConsumer(queue, message);
377
- const binding = callDefineQueueBinding(queue, exchange, options);
555
+ const binding = defineQueueBindingInternal(queue, exchange, options);
378
556
  if (exchange.type === "topic") {
379
557
  const createPublisher$1 = (routingKey) => {
380
- return callDefinePublisher(exchange, message, {
558
+ return definePublisherInternal(exchange, message, {
381
559
  ...options,
382
560
  routingKey
383
561
  });
@@ -389,7 +567,7 @@ function defineConsumerFirst(queue, exchange, message, options) {
389
567
  };
390
568
  }
391
569
  const createPublisher = () => {
392
- return callDefinePublisher(exchange, message, options);
570
+ return definePublisherInternal(exchange, message, options);
393
571
  };
394
572
  return {
395
573
  consumer,
@@ -399,5 +577,77 @@ function defineConsumerFirst(queue, exchange, message, options) {
399
577
  }
400
578
 
401
579
  //#endregion
402
- export { defineConsumer, defineConsumerFirst, defineContract, defineExchange, defineExchangeBinding, defineMessage, definePublisher, definePublisherFirst, defineQueue, defineQueueBinding };
580
+ //#region src/builder/ttl-backoff.ts
581
+ /**
582
+ * Create TTL-backoff retry infrastructure for a queue.
583
+ *
584
+ * This builder helper generates the wait queue and bindings needed for TTL-backoff retry.
585
+ * The generated infrastructure can be spread into a contract definition.
586
+ *
587
+ * TTL-backoff retry works by:
588
+ * 1. Failed messages are sent to the DLX with routing key `{queueName}-wait`
589
+ * 2. The wait queue receives these messages and holds them for a TTL period
590
+ * 3. After TTL expires, messages are dead-lettered back to the DLX with routing key `{queueName}`
591
+ * 4. The main queue receives the retried message via its binding to the DLX
592
+ *
593
+ * @param queue - The main queue definition (must have deadLetter configured)
594
+ * @param options - Optional configuration for the wait queue
595
+ * @param options.waitQueueDurable - Whether the wait queue should be durable (default: same as main queue)
596
+ * @returns TTL-backoff retry infrastructure containing wait queue and bindings
597
+ * @throws {Error} If the queue does not have a dead letter exchange configured
598
+ *
599
+ * @example
600
+ * ```typescript
601
+ * const dlx = defineExchange('orders-dlx', 'direct', { durable: true });
602
+ * const orderQueue = defineQueue('order-processing', {
603
+ * type: 'quorum',
604
+ * deadLetter: { exchange: dlx },
605
+ * retry: {
606
+ * mode: 'ttl-backoff',
607
+ * maxRetries: 5,
608
+ * initialDelayMs: 1000,
609
+ * },
610
+ * });
611
+ *
612
+ * // Generate TTL-backoff infrastructure
613
+ * const retryInfra = defineTtlBackoffRetryInfrastructure(orderQueue);
614
+ *
615
+ * // Spread into contract
616
+ * const contract = defineContract({
617
+ * exchanges: { dlx },
618
+ * queues: {
619
+ * orderProcessing: orderQueue,
620
+ * orderProcessingWait: retryInfra.waitQueue,
621
+ * },
622
+ * bindings: {
623
+ * ...// your other bindings
624
+ * orderWaitBinding: retryInfra.waitQueueBinding,
625
+ * orderRetryBinding: retryInfra.mainQueueRetryBinding,
626
+ * },
627
+ * // ... publishers and consumers
628
+ * });
629
+ * ```
630
+ */
631
+ function defineTtlBackoffRetryInfrastructure(queueEntry, options) {
632
+ const queue = extractQueue(queueEntry);
633
+ if (!queue.deadLetter) throw new Error(`Queue "${queue.name}" does not have a dead letter exchange configured. TTL-backoff retry requires deadLetter to be set on the queue.`);
634
+ const dlx = queue.deadLetter.exchange;
635
+ const waitQueueName = `${queue.name}-wait`;
636
+ const waitQueue = defineQueue(waitQueueName, {
637
+ type: "quorum",
638
+ durable: options?.waitQueueDurable ?? queue.durable ?? true,
639
+ deadLetter: {
640
+ exchange: dlx,
641
+ routingKey: queue.name
642
+ }
643
+ });
644
+ return {
645
+ waitQueue,
646
+ waitQueueBinding: defineQueueBindingInternal(waitQueue, dlx, { routingKey: waitQueueName }),
647
+ mainQueueRetryBinding: defineQueueBindingInternal(queue, dlx, { routingKey: queue.name })
648
+ };
649
+ }
650
+
651
+ //#endregion
652
+ export { defineConsumer, defineConsumerFirst, defineContract, defineExchange, defineExchangeBinding, defineMessage, definePublisher, definePublisherFirst, defineQueue, defineQueueBinding, defineTtlBackoffRetryInfrastructure, extractQueue };
403
653
  //# sourceMappingURL=index.mjs.map