Skip to content

Commit c9fdfef

Browse files
committed
doc: prefetch on extendedOptions
1 parent 896e489 commit c9fdfef

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,9 @@ const extendedOptions: IRMQExtendedOptions = {
6262
options: { exclusive: true },
6363
consumOptions: { noAck: true },
6464
},
65-
messageTimeout: 50000,
66-
},
67-
socketOptions: {
68-
clientProperties: { connection_name: 'myFriendlyName' },
65+
//..
6966
},
67+
//...
7068
};
7169

7270
@Module({
@@ -126,12 +124,16 @@ RmqModule.forRoot({
126124
```
127125

128126
<br/>
129-
In forRoot({ connectOptions, extendedOptions }), we pass an object consisting of two parameters. The first, connectOptions, is used for connections, and the second, extendedOptions, is for additional settings.
130127

131-
- **connectOptions** - standard parameters [amqlib.connect](https://amqp-node.github.io/amqplib/channel_api.html#connect) for connection. Parameters can be an object or a URI.
132-
- **extendedOptions** - environment settings (optional)
128+
In `forRoot({ connectOptions, extendedOptions })`, we pass an object consisting of two parameters. The first, connectOptions, is used for connections, and the second, extendedOptions, is for additional settings.
129+
130+
- **connectOptions: IRMQConnectConfig** - standard parameters [amqlib.connect](https://amqp-node.github.io/amqplib/channel_api.html#connect) for connection. Parameters can be an object or a URI.
131+
- **extendedOptions: IRMQExtendedOptions** - environment settings (optional)
133132

134133
- **typeChannel** - [channel type](https://amqp-node.github.io/amqplib/channel_api.html#channels), default is `TypeChannel.CHANNEL`
134+
- **prefetch** - Configuration for message prefetching. [See](https://amqp-node.github.io/amqplib/channel_api.html#channel_prefetch)
135+
- **count** - The maximum number of messages that can be sent over the channel before receiving an acknowledgment. A falsy value indicates no limit.
136+
- **isGlobal** - If `true`, applies the prefetch limit to the entire channel (for versions before RabbitMQ 3.3.0). For newer versions, this parameter is ignored as prefetch is applied per consumer.
135137
- **socketOptions** - here you can configure SSL/TLS. See [SSL/TLS](https://amqp-node.github.io/amqplib/ssl.html) and [Client properties](https://amqp-node.github.io/amqplib/channel_api.html#client-properties)
136138
- **globalBroker** - specify if you want to use RPC from `RmqGlobalService`
137139
- **replyTo** - needed for setting up the `replyTo` queue

0 commit comments

Comments
 (0)