@amqp-contract/core 0.21.0 → 0.22.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.
- package/dist/index.cjs +77 -12
- package/dist/index.d.cts +23 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +23 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +78 -13
- package/dist/index.mjs.map +1 -1
- package/docs/index.md +83 -70
- package/package.json +4 -4
package/docs/index.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
### AmqpClient
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
11
|
+
Defined in: [packages/core/src/amqp-client.ts:103](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L103)
|
|
12
12
|
|
|
13
13
|
AMQP client that manages connections and channels with automatic topology setup.
|
|
14
14
|
|
|
@@ -46,7 +46,7 @@ await client.close().resultToPromise();
|
|
|
46
46
|
new AmqpClient(contract, options): AmqpClient;
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
49
|
+
Defined in: [packages/core/src/amqp-client.ts:121](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L121)
|
|
50
50
|
|
|
51
51
|
Create a new AMQP client instance.
|
|
52
52
|
|
|
@@ -74,7 +74,7 @@ The client will automatically:
|
|
|
74
74
|
ack(msg, allUpTo?): void;
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
77
|
+
Defined in: [packages/core/src/amqp-client.ts:295](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L295)
|
|
78
78
|
|
|
79
79
|
Acknowledge a message.
|
|
80
80
|
|
|
@@ -95,7 +95,7 @@ Acknowledge a message.
|
|
|
95
95
|
addSetup(setup): void;
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
98
|
+
Defined in: [packages/core/src/amqp-client.ts:317](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L317)
|
|
99
99
|
|
|
100
100
|
Add a setup function to be called when the channel is created or reconnected.
|
|
101
101
|
|
|
@@ -117,7 +117,7 @@ This is useful for setting up channel-level configuration like prefetch.
|
|
|
117
117
|
cancel(consumerTag): Future<Result<void, TechnicalError>>;
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
120
|
+
Defined in: [packages/core/src/amqp-client.ts:283](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L283)
|
|
121
121
|
|
|
122
122
|
Cancel a consumer by its consumer tag.
|
|
123
123
|
|
|
@@ -139,7 +139,7 @@ A Future that resolves when the consumer is cancelled
|
|
|
139
139
|
close(): Future<Result<void, TechnicalError>>;
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
142
|
+
Defined in: [packages/core/src/amqp-client.ts:346](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L346)
|
|
143
143
|
|
|
144
144
|
Close the channel and release the connection reference.
|
|
145
145
|
|
|
@@ -163,7 +163,7 @@ consume(
|
|
|
163
163
|
options?): Future<Result<string, TechnicalError>>;
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
166
|
+
Defined in: [packages/core/src/amqp-client.ts:267](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L267)
|
|
167
167
|
|
|
168
168
|
Start consuming messages from a queue.
|
|
169
169
|
|
|
@@ -187,7 +187,7 @@ A Future with `Result<string>` - the consumer tag
|
|
|
187
187
|
getConnection(): IAmqpConnectionManager;
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
190
|
+
Defined in: [packages/core/src/amqp-client.ts:172](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L172)
|
|
191
191
|
|
|
192
192
|
Get the underlying connection manager
|
|
193
193
|
|
|
@@ -210,7 +210,7 @@ nack(
|
|
|
210
210
|
requeue?): void;
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
213
|
+
Defined in: [packages/core/src/amqp-client.ts:306](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L306)
|
|
214
214
|
|
|
215
215
|
Negative acknowledge a message.
|
|
216
216
|
|
|
@@ -232,7 +232,7 @@ Negative acknowledge a message.
|
|
|
232
232
|
on(event, listener): void;
|
|
233
233
|
```
|
|
234
234
|
|
|
235
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
235
|
+
Defined in: [packages/core/src/amqp-client.ts:332](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L332)
|
|
236
236
|
|
|
237
237
|
Register an event listener on the channel wrapper.
|
|
238
238
|
|
|
@@ -262,7 +262,7 @@ publish(
|
|
|
262
262
|
options?): Future<Result<boolean, TechnicalError>>;
|
|
263
263
|
```
|
|
264
264
|
|
|
265
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
265
|
+
Defined in: [packages/core/src/amqp-client.ts:230](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L230)
|
|
266
266
|
|
|
267
267
|
Publish a message to an exchange.
|
|
268
268
|
|
|
@@ -290,7 +290,7 @@ sendToQueue(
|
|
|
290
290
|
options?): Future<Result<boolean, TechnicalError>>;
|
|
291
291
|
```
|
|
292
292
|
|
|
293
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
293
|
+
Defined in: [packages/core/src/amqp-client.ts:249](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L249)
|
|
294
294
|
|
|
295
295
|
Publish a message directly to a queue.
|
|
296
296
|
|
|
@@ -314,21 +314,33 @@ A Future with `Result<boolean>` - true if message was sent, false if channel buf
|
|
|
314
314
|
waitForConnect(): Future<Result<void, TechnicalError>>;
|
|
315
315
|
```
|
|
316
316
|
|
|
317
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
317
|
+
Defined in: [packages/core/src/amqp-client.ts:193](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L193)
|
|
318
318
|
|
|
319
319
|
Wait for the channel to be connected and ready.
|
|
320
320
|
|
|
321
|
+
If `connectTimeoutMs` was provided in the constructor options, the returned
|
|
322
|
+
Future resolves to `Result.Error<TechnicalError>` once the timeout elapses.
|
|
323
|
+
Without a timeout, this waits forever — amqp-connection-manager retries
|
|
324
|
+
connections indefinitely and never errors on its own.
|
|
325
|
+
|
|
326
|
+
NOTE: When using `AmqpClient` directly (not via `TypedAmqpClient` /
|
|
327
|
+
`TypedAmqpWorker`), the constructor has already incremented the pooled
|
|
328
|
+
connection's reference count. Callers must invoke `close()` on the error
|
|
329
|
+
path to release the connection — `waitForConnect` does not do this
|
|
330
|
+
automatically. The typed factories handle this cleanup for you.
|
|
331
|
+
|
|
321
332
|
###### Returns
|
|
322
333
|
|
|
323
334
|
`Future`<`Result`<`void`, [`TechnicalError`](#technicalerror)>>
|
|
324
335
|
|
|
325
|
-
A Future
|
|
336
|
+
A Future resolving to `Result.Ok(void)` on connect, or
|
|
337
|
+
`Result.Error(TechnicalError)` on timeout / connection failure.
|
|
326
338
|
|
|
327
339
|
***
|
|
328
340
|
|
|
329
341
|
### ConnectionManagerSingleton
|
|
330
342
|
|
|
331
|
-
Defined in: [packages/core/src/connection-manager.ts:23](https://github.com/btravers/amqp-contract/blob/
|
|
343
|
+
Defined in: [packages/core/src/connection-manager.ts:23](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/connection-manager.ts#L23)
|
|
332
344
|
|
|
333
345
|
Connection manager singleton for sharing AMQP connections across clients.
|
|
334
346
|
|
|
@@ -354,7 +366,7 @@ await manager.releaseConnection(['amqp://localhost']);
|
|
|
354
366
|
getConnection(urls, connectionOptions?): IAmqpConnectionManager;
|
|
355
367
|
```
|
|
356
368
|
|
|
357
|
-
Defined in: [packages/core/src/connection-manager.ts:52](https://github.com/btravers/amqp-contract/blob/
|
|
369
|
+
Defined in: [packages/core/src/connection-manager.ts:52](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/connection-manager.ts#L52)
|
|
358
370
|
|
|
359
371
|
Get or create a connection for the given URLs and options.
|
|
360
372
|
|
|
@@ -380,7 +392,7 @@ The AMQP connection manager instance
|
|
|
380
392
|
releaseConnection(urls, connectionOptions?): Promise<void>;
|
|
381
393
|
```
|
|
382
394
|
|
|
383
|
-
Defined in: [packages/core/src/connection-manager.ts:81](https://github.com/btravers/amqp-contract/blob/
|
|
395
|
+
Defined in: [packages/core/src/connection-manager.ts:81](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/connection-manager.ts#L81)
|
|
384
396
|
|
|
385
397
|
Release a connection reference.
|
|
386
398
|
|
|
@@ -406,7 +418,7 @@ A promise that resolves when the connection is released (and closed if necessary
|
|
|
406
418
|
static getInstance(): ConnectionManagerSingleton;
|
|
407
419
|
```
|
|
408
420
|
|
|
409
|
-
Defined in: [packages/core/src/connection-manager.ts:35](https://github.com/btravers/amqp-contract/blob/
|
|
421
|
+
Defined in: [packages/core/src/connection-manager.ts:35](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/connection-manager.ts#L35)
|
|
410
422
|
|
|
411
423
|
Get the singleton instance of the connection manager.
|
|
412
424
|
|
|
@@ -420,7 +432,7 @@ The singleton instance
|
|
|
420
432
|
|
|
421
433
|
### MessageValidationError
|
|
422
434
|
|
|
423
|
-
Defined in: [packages/core/src/errors.ts:33](https://github.com/btravers/amqp-contract/blob/
|
|
435
|
+
Defined in: [packages/core/src/errors.ts:33](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/errors.ts#L33)
|
|
424
436
|
|
|
425
437
|
Error thrown when message validation fails (payload or headers).
|
|
426
438
|
|
|
@@ -447,7 +459,7 @@ The validation issues from the Standard Schema validation
|
|
|
447
459
|
new MessageValidationError(source, issues): MessageValidationError;
|
|
448
460
|
```
|
|
449
461
|
|
|
450
|
-
Defined in: [packages/core/src/errors.ts:34](https://github.com/btravers/amqp-contract/blob/
|
|
462
|
+
Defined in: [packages/core/src/errors.ts:34](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/errors.ts#L34)
|
|
451
463
|
|
|
452
464
|
###### Parameters
|
|
453
465
|
|
|
@@ -471,10 +483,10 @@ Error.constructor
|
|
|
471
483
|
| Property | Modifier | Type | Description | Inherited from | Defined in |
|
|
472
484
|
| ------ | ------ | ------ | ------ | ------ | ------ |
|
|
473
485
|
| <a id="cause"></a> `cause?` | `public` | `unknown` | - | `Error.cause` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 |
|
|
474
|
-
| <a id="issues"></a> `issues` | `readonly` | `unknown` | - | - | [packages/core/src/errors.ts:36](https://github.com/btravers/amqp-contract/blob/
|
|
486
|
+
| <a id="issues"></a> `issues` | `readonly` | `unknown` | - | - | [packages/core/src/errors.ts:36](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/errors.ts#L36) |
|
|
475
487
|
| <a id="message"></a> `message` | `public` | `string` | - | `Error.message` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 |
|
|
476
488
|
| <a id="name"></a> `name` | `public` | `string` | - | `Error.name` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1074 |
|
|
477
|
-
| <a id="source"></a> `source` | `readonly` | `string` | - | - | [packages/core/src/errors.ts:35](https://github.com/btravers/amqp-contract/blob/
|
|
489
|
+
| <a id="source"></a> `source` | `readonly` | `string` | - | - | [packages/core/src/errors.ts:35](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/errors.ts#L35) |
|
|
478
490
|
| <a id="stack"></a> `stack?` | `public` | `string` | - | `Error.stack` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 |
|
|
479
491
|
| <a id="stacktracelimit"></a> `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` | node\_modules/.pnpm/@types+node@25.6.0/node\_modules/@types/node/globals.d.ts:67 |
|
|
480
492
|
|
|
@@ -684,7 +696,7 @@ Error.prepareStackTrace
|
|
|
684
696
|
|
|
685
697
|
### TechnicalError
|
|
686
698
|
|
|
687
|
-
Defined in: [packages/core/src/errors.ts:7](https://github.com/btravers/amqp-contract/blob/
|
|
699
|
+
Defined in: [packages/core/src/errors.ts:7](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/errors.ts#L7)
|
|
688
700
|
|
|
689
701
|
Error for technical/runtime failures that cannot be prevented by TypeScript.
|
|
690
702
|
|
|
@@ -703,7 +715,7 @@ and other runtime errors. This error is shared across core, worker, and client p
|
|
|
703
715
|
new TechnicalError(message, cause?): TechnicalError;
|
|
704
716
|
```
|
|
705
717
|
|
|
706
|
-
Defined in: [packages/core/src/errors.ts:8](https://github.com/btravers/amqp-contract/blob/
|
|
718
|
+
Defined in: [packages/core/src/errors.ts:8](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/errors.ts#L8)
|
|
707
719
|
|
|
708
720
|
###### Parameters
|
|
709
721
|
|
|
@@ -726,7 +738,7 @@ Error.constructor
|
|
|
726
738
|
|
|
727
739
|
| Property | Modifier | Type | Description | Inherited from | Defined in |
|
|
728
740
|
| ------ | ------ | ------ | ------ | ------ | ------ |
|
|
729
|
-
| <a id="cause-1"></a> `cause?` | `readonly` | `unknown` | - | `Error.cause` | [packages/core/src/errors.ts:10](https://github.com/btravers/amqp-contract/blob/
|
|
741
|
+
| <a id="cause-1"></a> `cause?` | `readonly` | `unknown` | - | `Error.cause` | [packages/core/src/errors.ts:10](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/errors.ts#L10) |
|
|
730
742
|
| <a id="message-1"></a> `message` | `public` | `string` | - | `Error.message` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 |
|
|
731
743
|
| <a id="name-1"></a> `name` | `public` | `string` | - | `Error.name` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1074 |
|
|
732
744
|
| <a id="stack-1"></a> `stack?` | `public` | `string` | - | `Error.stack` | node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 |
|
|
@@ -942,7 +954,7 @@ Error.prepareStackTrace
|
|
|
942
954
|
type AmqpClientOptions = object;
|
|
943
955
|
```
|
|
944
956
|
|
|
945
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
957
|
+
Defined in: [packages/core/src/amqp-client.ts:47](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L47)
|
|
946
958
|
|
|
947
959
|
Options for creating an AMQP client.
|
|
948
960
|
|
|
@@ -950,9 +962,10 @@ Options for creating an AMQP client.
|
|
|
950
962
|
|
|
951
963
|
| Property | Type | Description | Defined in |
|
|
952
964
|
| ------ | ------ | ------ | ------ |
|
|
953
|
-
| <a id="channeloptions"></a> `channelOptions?` | `Partial`<`CreateChannelOpts`> | Optional channel configuration options. | [packages/core/src/amqp-client.ts:
|
|
954
|
-
| <a id="connectionoptions"></a> `connectionOptions?` | `AmqpConnectionManagerOptions` | Optional connection configuration (heartbeat, reconnect settings, etc.). | [packages/core/src/amqp-client.ts:
|
|
955
|
-
| <a id="
|
|
965
|
+
| <a id="channeloptions"></a> `channelOptions?` | `Partial`<`CreateChannelOpts`> | Optional channel configuration options. | [packages/core/src/amqp-client.ts:50](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L50) |
|
|
966
|
+
| <a id="connectionoptions"></a> `connectionOptions?` | `AmqpConnectionManagerOptions` | Optional connection configuration (heartbeat, reconnect settings, etc.). | [packages/core/src/amqp-client.ts:49](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L49) |
|
|
967
|
+
| <a id="connecttimeoutms"></a> `connectTimeoutMs?` | `number` | Maximum time in ms to wait for the channel to become ready in `waitForConnect`. If unset, waits forever (amqp-connection-manager retries indefinitely). | [packages/core/src/amqp-client.ts:51](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L51) |
|
|
968
|
+
| <a id="urls"></a> `urls` | `ConnectionUrl`[] | AMQP broker URL(s). Multiple URLs provide failover support. | [packages/core/src/amqp-client.ts:48](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L48) |
|
|
956
969
|
|
|
957
970
|
***
|
|
958
971
|
|
|
@@ -962,7 +975,7 @@ Options for creating an AMQP client.
|
|
|
962
975
|
type ConsumeCallback = (msg) => void | Promise<void>;
|
|
963
976
|
```
|
|
964
977
|
|
|
965
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
978
|
+
Defined in: [packages/core/src/amqp-client.ts:57](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L57)
|
|
966
979
|
|
|
967
980
|
Callback type for consuming messages.
|
|
968
981
|
|
|
@@ -984,7 +997,7 @@ Callback type for consuming messages.
|
|
|
984
997
|
type ConsumerOptions = Options.Consume & object;
|
|
985
998
|
```
|
|
986
999
|
|
|
987
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
1000
|
+
Defined in: [packages/core/src/amqp-client.ts:70](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L70)
|
|
988
1001
|
|
|
989
1002
|
Consume options that extend amqplib's Options.Consume with optional prefetch support.
|
|
990
1003
|
|
|
@@ -992,7 +1005,7 @@ Consume options that extend amqplib's Options.Consume with optional prefetch sup
|
|
|
992
1005
|
|
|
993
1006
|
| Name | Type | Description | Defined in |
|
|
994
1007
|
| ------ | ------ | ------ | ------ |
|
|
995
|
-
| `prefetch?` | `number` | Number of messages to prefetch | [packages/core/src/amqp-client.ts:
|
|
1008
|
+
| `prefetch?` | `number` | Number of messages to prefetch | [packages/core/src/amqp-client.ts:72](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L72) |
|
|
996
1009
|
|
|
997
1010
|
***
|
|
998
1011
|
|
|
@@ -1002,7 +1015,7 @@ Consume options that extend amqplib's Options.Consume with optional prefetch sup
|
|
|
1002
1015
|
type Logger = object;
|
|
1003
1016
|
```
|
|
1004
1017
|
|
|
1005
|
-
Defined in: [packages/core/src/logger.ts:30](https://github.com/btravers/amqp-contract/blob/
|
|
1018
|
+
Defined in: [packages/core/src/logger.ts:30](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/logger.ts#L30)
|
|
1006
1019
|
|
|
1007
1020
|
Logger interface for amqp-contract packages.
|
|
1008
1021
|
|
|
@@ -1029,7 +1042,7 @@ const logger: Logger = {
|
|
|
1029
1042
|
debug(message, context?): void;
|
|
1030
1043
|
```
|
|
1031
1044
|
|
|
1032
|
-
Defined in: [packages/core/src/logger.ts:36](https://github.com/btravers/amqp-contract/blob/
|
|
1045
|
+
Defined in: [packages/core/src/logger.ts:36](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/logger.ts#L36)
|
|
1033
1046
|
|
|
1034
1047
|
Log debug level messages
|
|
1035
1048
|
|
|
@@ -1050,7 +1063,7 @@ Log debug level messages
|
|
|
1050
1063
|
error(message, context?): void;
|
|
1051
1064
|
```
|
|
1052
1065
|
|
|
1053
|
-
Defined in: [packages/core/src/logger.ts:57](https://github.com/btravers/amqp-contract/blob/
|
|
1066
|
+
Defined in: [packages/core/src/logger.ts:57](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/logger.ts#L57)
|
|
1054
1067
|
|
|
1055
1068
|
Log error level messages
|
|
1056
1069
|
|
|
@@ -1071,7 +1084,7 @@ Log error level messages
|
|
|
1071
1084
|
info(message, context?): void;
|
|
1072
1085
|
```
|
|
1073
1086
|
|
|
1074
|
-
Defined in: [packages/core/src/logger.ts:43](https://github.com/btravers/amqp-contract/blob/
|
|
1087
|
+
Defined in: [packages/core/src/logger.ts:43](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/logger.ts#L43)
|
|
1075
1088
|
|
|
1076
1089
|
Log info level messages
|
|
1077
1090
|
|
|
@@ -1092,7 +1105,7 @@ Log info level messages
|
|
|
1092
1105
|
warn(message, context?): void;
|
|
1093
1106
|
```
|
|
1094
1107
|
|
|
1095
|
-
Defined in: [packages/core/src/logger.ts:50](https://github.com/btravers/amqp-contract/blob/
|
|
1108
|
+
Defined in: [packages/core/src/logger.ts:50](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/logger.ts#L50)
|
|
1096
1109
|
|
|
1097
1110
|
Log warning level messages
|
|
1098
1111
|
|
|
@@ -1115,7 +1128,7 @@ Log warning level messages
|
|
|
1115
1128
|
type LoggerContext = Record<string, unknown> & object;
|
|
1116
1129
|
```
|
|
1117
1130
|
|
|
1118
|
-
Defined in: [packages/core/src/logger.ts:9](https://github.com/btravers/amqp-contract/blob/
|
|
1131
|
+
Defined in: [packages/core/src/logger.ts:9](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/logger.ts#L9)
|
|
1119
1132
|
|
|
1120
1133
|
Context object for logger methods.
|
|
1121
1134
|
|
|
@@ -1126,7 +1139,7 @@ for common logging context properties.
|
|
|
1126
1139
|
|
|
1127
1140
|
| Name | Type | Defined in |
|
|
1128
1141
|
| ------ | ------ | ------ |
|
|
1129
|
-
| `error?` | `unknown` | [packages/core/src/logger.ts:10](https://github.com/btravers/amqp-contract/blob/
|
|
1142
|
+
| `error?` | `unknown` | [packages/core/src/logger.ts:10](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/logger.ts#L10) |
|
|
1130
1143
|
|
|
1131
1144
|
***
|
|
1132
1145
|
|
|
@@ -1136,7 +1149,7 @@ for common logging context properties.
|
|
|
1136
1149
|
type PublishOptions = Options.Publish & object;
|
|
1137
1150
|
```
|
|
1138
1151
|
|
|
1139
|
-
Defined in: [packages/core/src/amqp-client.ts:
|
|
1152
|
+
Defined in: [packages/core/src/amqp-client.ts:62](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L62)
|
|
1140
1153
|
|
|
1141
1154
|
Publish options that extend amqplib's Options.Publish with optional timeout support.
|
|
1142
1155
|
|
|
@@ -1144,7 +1157,7 @@ Publish options that extend amqplib's Options.Publish with optional timeout supp
|
|
|
1144
1157
|
|
|
1145
1158
|
| Name | Type | Description | Defined in |
|
|
1146
1159
|
| ------ | ------ | ------ | ------ |
|
|
1147
|
-
| `timeout?` | `number` | Message will be rejected after timeout ms | [packages/core/src/amqp-client.ts:
|
|
1160
|
+
| `timeout?` | `number` | Message will be rejected after timeout ms | [packages/core/src/amqp-client.ts:64](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/amqp-client.ts#L64) |
|
|
1148
1161
|
|
|
1149
1162
|
***
|
|
1150
1163
|
|
|
@@ -1154,7 +1167,7 @@ Publish options that extend amqplib's Options.Publish with optional timeout supp
|
|
|
1154
1167
|
type TelemetryProvider = object;
|
|
1155
1168
|
```
|
|
1156
1169
|
|
|
1157
|
-
Defined in: [packages/core/src/telemetry.ts:53](https://github.com/btravers/amqp-contract/blob/
|
|
1170
|
+
Defined in: [packages/core/src/telemetry.ts:53](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L53)
|
|
1158
1171
|
|
|
1159
1172
|
Telemetry provider for AMQP operations.
|
|
1160
1173
|
Uses lazy loading to gracefully handle cases where OpenTelemetry is not installed.
|
|
@@ -1163,11 +1176,11 @@ Uses lazy loading to gracefully handle cases where OpenTelemetry is not installe
|
|
|
1163
1176
|
|
|
1164
1177
|
| Property | Type | Description | Defined in |
|
|
1165
1178
|
| ------ | ------ | ------ | ------ |
|
|
1166
|
-
| <a id="getconsumecounter"></a> `getConsumeCounter` | () => `Counter` \| `undefined` | Get a counter for messages consumed. Returns undefined if OpenTelemetry is not available. | [packages/core/src/telemetry.ts:70](https://github.com/btravers/amqp-contract/blob/
|
|
1167
|
-
| <a id="getconsumelatencyhistogram"></a> `getConsumeLatencyHistogram` | () => `Histogram` \| `undefined` | Get a histogram for consume/process latency. Returns undefined if OpenTelemetry is not available. | [packages/core/src/telemetry.ts:82](https://github.com/btravers/amqp-contract/blob/
|
|
1168
|
-
| <a id="getpublishcounter"></a> `getPublishCounter` | () => `Counter` \| `undefined` | Get a counter for messages published. Returns undefined if OpenTelemetry is not available. | [packages/core/src/telemetry.ts:64](https://github.com/btravers/amqp-contract/blob/
|
|
1169
|
-
| <a id="getpublishlatencyhistogram"></a> `getPublishLatencyHistogram` | () => `Histogram` \| `undefined` | Get a histogram for publish latency. Returns undefined if OpenTelemetry is not available. | [packages/core/src/telemetry.ts:76](https://github.com/btravers/amqp-contract/blob/
|
|
1170
|
-
| <a id="gettracer"></a> `getTracer` | () => `Tracer` \| `undefined` | Get a tracer instance for creating spans. Returns undefined if OpenTelemetry is not available. | [packages/core/src/telemetry.ts:58](https://github.com/btravers/amqp-contract/blob/
|
|
1179
|
+
| <a id="getconsumecounter"></a> `getConsumeCounter` | () => `Counter` \| `undefined` | Get a counter for messages consumed. Returns undefined if OpenTelemetry is not available. | [packages/core/src/telemetry.ts:70](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L70) |
|
|
1180
|
+
| <a id="getconsumelatencyhistogram"></a> `getConsumeLatencyHistogram` | () => `Histogram` \| `undefined` | Get a histogram for consume/process latency. Returns undefined if OpenTelemetry is not available. | [packages/core/src/telemetry.ts:82](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L82) |
|
|
1181
|
+
| <a id="getpublishcounter"></a> `getPublishCounter` | () => `Counter` \| `undefined` | Get a counter for messages published. Returns undefined if OpenTelemetry is not available. | [packages/core/src/telemetry.ts:64](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L64) |
|
|
1182
|
+
| <a id="getpublishlatencyhistogram"></a> `getPublishLatencyHistogram` | () => `Histogram` \| `undefined` | Get a histogram for publish latency. Returns undefined if OpenTelemetry is not available. | [packages/core/src/telemetry.ts:76](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L76) |
|
|
1183
|
+
| <a id="gettracer"></a> `getTracer` | () => `Tracer` \| `undefined` | Get a tracer instance for creating spans. Returns undefined if OpenTelemetry is not available. | [packages/core/src/telemetry.ts:58](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L58) |
|
|
1171
1184
|
|
|
1172
1185
|
## Variables
|
|
1173
1186
|
|
|
@@ -1177,7 +1190,7 @@ Uses lazy loading to gracefully handle cases where OpenTelemetry is not installe
|
|
|
1177
1190
|
const defaultTelemetryProvider: TelemetryProvider;
|
|
1178
1191
|
```
|
|
1179
1192
|
|
|
1180
|
-
Defined in: [packages/core/src/telemetry.ts:194](https://github.com/btravers/amqp-contract/blob/
|
|
1193
|
+
Defined in: [packages/core/src/telemetry.ts:194](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L194)
|
|
1181
1194
|
|
|
1182
1195
|
Default telemetry provider that uses OpenTelemetry API if available.
|
|
1183
1196
|
|
|
@@ -1189,7 +1202,7 @@ Default telemetry provider that uses OpenTelemetry API if available.
|
|
|
1189
1202
|
const MessagingSemanticConventions: object;
|
|
1190
1203
|
```
|
|
1191
1204
|
|
|
1192
|
-
Defined in: [packages/core/src/telemetry.ts:25](https://github.com/btravers/amqp-contract/blob/
|
|
1205
|
+
Defined in: [packages/core/src/telemetry.ts:25](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L25)
|
|
1193
1206
|
|
|
1194
1207
|
Semantic conventions for AMQP messaging following OpenTelemetry standards.
|
|
1195
1208
|
|
|
@@ -1197,20 +1210,20 @@ Semantic conventions for AMQP messaging following OpenTelemetry standards.
|
|
|
1197
1210
|
|
|
1198
1211
|
| Name | Type | Default value | Defined in |
|
|
1199
1212
|
| ------ | ------ | ------ | ------ |
|
|
1200
|
-
| <a id="property-amqp_consumer_name"></a> `AMQP_CONSUMER_NAME` | `"amqp.consumer.name"` | `"amqp.consumer.name"` | [packages/core/src/telemetry.ts:36](https://github.com/btravers/amqp-contract/blob/
|
|
1201
|
-
| <a id="property-amqp_publisher_name"></a> `AMQP_PUBLISHER_NAME` | `"amqp.publisher.name"` | `"amqp.publisher.name"` | [packages/core/src/telemetry.ts:35](https://github.com/btravers/amqp-contract/blob/
|
|
1202
|
-
| <a id="property-error_type"></a> `ERROR_TYPE` | `"error.type"` | `"error.type"` | [packages/core/src/telemetry.ts:39](https://github.com/btravers/amqp-contract/blob/
|
|
1203
|
-
| <a id="property-messaging_destination"></a> `MESSAGING_DESTINATION` | `"messaging.destination.name"` | `"messaging.destination.name"` | [packages/core/src/telemetry.ts:28](https://github.com/btravers/amqp-contract/blob/
|
|
1204
|
-
| <a id="property-messaging_destination_kind"></a> `MESSAGING_DESTINATION_KIND` | `"messaging.destination.kind"` | `"messaging.destination.kind"` | [packages/core/src/telemetry.ts:29](https://github.com/btravers/amqp-contract/blob/
|
|
1205
|
-
| <a id="property-messaging_destination_kind_exchange"></a> `MESSAGING_DESTINATION_KIND_EXCHANGE` | `"exchange"` | `"exchange"` | [packages/core/src/telemetry.ts:43](https://github.com/btravers/amqp-contract/blob/
|
|
1206
|
-
| <a id="property-messaging_destination_kind_queue"></a> `MESSAGING_DESTINATION_KIND_QUEUE` | `"queue"` | `"queue"` | [packages/core/src/telemetry.ts:44](https://github.com/btravers/amqp-contract/blob/
|
|
1207
|
-
| <a id="property-messaging_operation"></a> `MESSAGING_OPERATION` | `"messaging.operation"` | `"messaging.operation"` | [packages/core/src/telemetry.ts:30](https://github.com/btravers/amqp-contract/blob/
|
|
1208
|
-
| <a id="property-messaging_operation_process"></a> `MESSAGING_OPERATION_PROCESS` | `"process"` | `"process"` | [packages/core/src/telemetry.ts:46](https://github.com/btravers/amqp-contract/blob/
|
|
1209
|
-
| <a id="property-messaging_operation_publish"></a> `MESSAGING_OPERATION_PUBLISH` | `"publish"` | `"publish"` | [packages/core/src/telemetry.ts:45](https://github.com/btravers/amqp-contract/blob/
|
|
1210
|
-
| <a id="property-messaging_rabbitmq_message_delivery_tag"></a> `MESSAGING_RABBITMQ_MESSAGE_DELIVERY_TAG` | `"messaging.rabbitmq.message.delivery_tag"` | `"messaging.rabbitmq.message.delivery_tag"` | [packages/core/src/telemetry.ts:34](https://github.com/btravers/amqp-contract/blob/
|
|
1211
|
-
| <a id="property-messaging_rabbitmq_routing_key"></a> `MESSAGING_RABBITMQ_ROUTING_KEY` | `"messaging.rabbitmq.destination.routing_key"` | `"messaging.rabbitmq.destination.routing_key"` | [packages/core/src/telemetry.ts:33](https://github.com/btravers/amqp-contract/blob/
|
|
1212
|
-
| <a id="property-messaging_system"></a> `MESSAGING_SYSTEM` | `"messaging.system"` | `"messaging.system"` | [packages/core/src/telemetry.ts:27](https://github.com/btravers/amqp-contract/blob/
|
|
1213
|
-
| <a id="property-messaging_system_rabbitmq"></a> `MESSAGING_SYSTEM_RABBITMQ` | `"rabbitmq"` | `"rabbitmq"` | [packages/core/src/telemetry.ts:42](https://github.com/btravers/amqp-contract/blob/
|
|
1213
|
+
| <a id="property-amqp_consumer_name"></a> `AMQP_CONSUMER_NAME` | `"amqp.consumer.name"` | `"amqp.consumer.name"` | [packages/core/src/telemetry.ts:36](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L36) |
|
|
1214
|
+
| <a id="property-amqp_publisher_name"></a> `AMQP_PUBLISHER_NAME` | `"amqp.publisher.name"` | `"amqp.publisher.name"` | [packages/core/src/telemetry.ts:35](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L35) |
|
|
1215
|
+
| <a id="property-error_type"></a> `ERROR_TYPE` | `"error.type"` | `"error.type"` | [packages/core/src/telemetry.ts:39](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L39) |
|
|
1216
|
+
| <a id="property-messaging_destination"></a> `MESSAGING_DESTINATION` | `"messaging.destination.name"` | `"messaging.destination.name"` | [packages/core/src/telemetry.ts:28](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L28) |
|
|
1217
|
+
| <a id="property-messaging_destination_kind"></a> `MESSAGING_DESTINATION_KIND` | `"messaging.destination.kind"` | `"messaging.destination.kind"` | [packages/core/src/telemetry.ts:29](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L29) |
|
|
1218
|
+
| <a id="property-messaging_destination_kind_exchange"></a> `MESSAGING_DESTINATION_KIND_EXCHANGE` | `"exchange"` | `"exchange"` | [packages/core/src/telemetry.ts:43](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L43) |
|
|
1219
|
+
| <a id="property-messaging_destination_kind_queue"></a> `MESSAGING_DESTINATION_KIND_QUEUE` | `"queue"` | `"queue"` | [packages/core/src/telemetry.ts:44](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L44) |
|
|
1220
|
+
| <a id="property-messaging_operation"></a> `MESSAGING_OPERATION` | `"messaging.operation"` | `"messaging.operation"` | [packages/core/src/telemetry.ts:30](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L30) |
|
|
1221
|
+
| <a id="property-messaging_operation_process"></a> `MESSAGING_OPERATION_PROCESS` | `"process"` | `"process"` | [packages/core/src/telemetry.ts:46](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L46) |
|
|
1222
|
+
| <a id="property-messaging_operation_publish"></a> `MESSAGING_OPERATION_PUBLISH` | `"publish"` | `"publish"` | [packages/core/src/telemetry.ts:45](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L45) |
|
|
1223
|
+
| <a id="property-messaging_rabbitmq_message_delivery_tag"></a> `MESSAGING_RABBITMQ_MESSAGE_DELIVERY_TAG` | `"messaging.rabbitmq.message.delivery_tag"` | `"messaging.rabbitmq.message.delivery_tag"` | [packages/core/src/telemetry.ts:34](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L34) |
|
|
1224
|
+
| <a id="property-messaging_rabbitmq_routing_key"></a> `MESSAGING_RABBITMQ_ROUTING_KEY` | `"messaging.rabbitmq.destination.routing_key"` | `"messaging.rabbitmq.destination.routing_key"` | [packages/core/src/telemetry.ts:33](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L33) |
|
|
1225
|
+
| <a id="property-messaging_system"></a> `MESSAGING_SYSTEM` | `"messaging.system"` | `"messaging.system"` | [packages/core/src/telemetry.ts:27](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L27) |
|
|
1226
|
+
| <a id="property-messaging_system_rabbitmq"></a> `MESSAGING_SYSTEM_RABBITMQ` | `"rabbitmq"` | `"rabbitmq"` | [packages/core/src/telemetry.ts:42](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L42) |
|
|
1214
1227
|
|
|
1215
1228
|
#### See
|
|
1216
1229
|
|
|
@@ -1224,7 +1237,7 @@ https://opentelemetry.io/docs/specs/semconv/messaging/messaging-spans/
|
|
|
1224
1237
|
function endSpanError(span, error): void;
|
|
1225
1238
|
```
|
|
1226
1239
|
|
|
1227
|
-
Defined in: [packages/core/src/telemetry.ts:288](https://github.com/btravers/amqp-contract/blob/
|
|
1240
|
+
Defined in: [packages/core/src/telemetry.ts:288](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L288)
|
|
1228
1241
|
|
|
1229
1242
|
End a span with error status.
|
|
1230
1243
|
|
|
@@ -1247,7 +1260,7 @@ End a span with error status.
|
|
|
1247
1260
|
function endSpanSuccess(span): void;
|
|
1248
1261
|
```
|
|
1249
1262
|
|
|
1250
|
-
Defined in: [packages/core/src/telemetry.ts:273](https://github.com/btravers/amqp-contract/blob/
|
|
1263
|
+
Defined in: [packages/core/src/telemetry.ts:273](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L273)
|
|
1251
1264
|
|
|
1252
1265
|
End a span with success status.
|
|
1253
1266
|
|
|
@@ -1274,7 +1287,7 @@ function recordConsumeMetric(
|
|
|
1274
1287
|
durationMs): void;
|
|
1275
1288
|
```
|
|
1276
1289
|
|
|
1277
|
-
Defined in: [packages/core/src/telemetry.ts:332](https://github.com/btravers/amqp-contract/blob/
|
|
1290
|
+
Defined in: [packages/core/src/telemetry.ts:332](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L332)
|
|
1278
1291
|
|
|
1279
1292
|
Record a consume metric.
|
|
1280
1293
|
|
|
@@ -1305,7 +1318,7 @@ function recordPublishMetric(
|
|
|
1305
1318
|
durationMs): void;
|
|
1306
1319
|
```
|
|
1307
1320
|
|
|
1308
|
-
Defined in: [packages/core/src/telemetry.ts:305](https://github.com/btravers/amqp-contract/blob/
|
|
1321
|
+
Defined in: [packages/core/src/telemetry.ts:305](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L305)
|
|
1309
1322
|
|
|
1310
1323
|
Record a publish metric.
|
|
1311
1324
|
|
|
@@ -1331,7 +1344,7 @@ Record a publish metric.
|
|
|
1331
1344
|
function setupAmqpTopology(channel, contract): Promise<void>;
|
|
1332
1345
|
```
|
|
1333
1346
|
|
|
1334
|
-
Defined in: [packages/core/src/setup.ts:26](https://github.com/btravers/amqp-contract/blob/
|
|
1347
|
+
Defined in: [packages/core/src/setup.ts:26](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/setup.ts#L26)
|
|
1335
1348
|
|
|
1336
1349
|
Setup AMQP topology (exchanges, queues, and bindings) from a contract definition.
|
|
1337
1350
|
|
|
@@ -1379,7 +1392,7 @@ function startConsumeSpan(
|
|
|
1379
1392
|
attributes?): Span | undefined;
|
|
1380
1393
|
```
|
|
1381
1394
|
|
|
1382
|
-
Defined in: [packages/core/src/telemetry.ts:241](https://github.com/btravers/amqp-contract/blob/
|
|
1395
|
+
Defined in: [packages/core/src/telemetry.ts:241](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L241)
|
|
1383
1396
|
|
|
1384
1397
|
Create a span for a consume/process operation.
|
|
1385
1398
|
Returns undefined if OpenTelemetry is not available.
|
|
@@ -1409,7 +1422,7 @@ function startPublishSpan(
|
|
|
1409
1422
|
attributes?): Span | undefined;
|
|
1410
1423
|
```
|
|
1411
1424
|
|
|
1412
|
-
Defined in: [packages/core/src/telemetry.ts:206](https://github.com/btravers/amqp-contract/blob/
|
|
1425
|
+
Defined in: [packages/core/src/telemetry.ts:206](https://github.com/btravers/amqp-contract/blob/da9b95c747db8d5af9183ca6fe2a6e0af558d1fa/packages/core/src/telemetry.ts#L206)
|
|
1413
1426
|
|
|
1414
1427
|
Create a span for a publish operation.
|
|
1415
1428
|
Returns undefined if OpenTelemetry is not available.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amqp-contract/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Core utilities for AMQP setup and management in amqp-contract",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"amqp",
|
|
@@ -53,18 +53,18 @@
|
|
|
53
53
|
"@swan-io/boxed": "3.2.1",
|
|
54
54
|
"amqp-connection-manager": "5.0.0",
|
|
55
55
|
"amqplib": "1.0.3",
|
|
56
|
-
"@amqp-contract/contract": "0.
|
|
56
|
+
"@amqp-contract/contract": "0.22.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@opentelemetry/api": "1.9.1",
|
|
60
60
|
"@types/amqplib": "0.10.8",
|
|
61
61
|
"@vitest/coverage-v8": "4.1.5",
|
|
62
|
-
"tsdown": "0.21.
|
|
62
|
+
"tsdown": "0.21.10",
|
|
63
63
|
"typedoc": "0.28.19",
|
|
64
64
|
"typescript": "6.0.3",
|
|
65
65
|
"vitest": "4.1.5",
|
|
66
66
|
"zod": "4.3.6",
|
|
67
|
-
"@amqp-contract/testing": "0.
|
|
67
|
+
"@amqp-contract/testing": "0.22.0",
|
|
68
68
|
"@amqp-contract/tsconfig": "0.1.0",
|
|
69
69
|
"@amqp-contract/typedoc": "0.1.0"
|
|
70
70
|
},
|