This function is used to modify a stream configuration (JetStream).
Context
Windows client
Windows server
Java client
Java server
Adelia Web Client
Adelia Cloud client
Event Adelia client
Parameters
NUM_BIN_4
| Handle | Connection ID |
ALPHA | Stream | Stream name |
ALPHA
| Options | List of stream configuration options in the form of a list of key/value pairs separated by semi-colons.
Please see NATS documentation for a detailed explanation of the configuration options.
The accepted options are:
description
|
Stream description |
sealed |
Used to lock streams which can no longer receive messages. Boolean. |
compressionOption |
Compression option (none, s2) |
discardPolicy |
Discard policy (new, old) |
maxMsgs |
Maximum number of messages. Not entered by default (-1). |
maxMsgsPerSubject |
Maximum number of messages per subject. Not entered by default (-1). |
maxBytes |
Maximum stream size. Not entered by default (-1). |
maxAge |
Maximum message lifespan in milliseconds. Not entered by default (0). |
maxMsgSize |
Maximum message size. Not entered by default (-1). |
replicas |
Number of stored replicas (from 1 to 5) |
noAck |
Disabling of client acknowledgments. Boolean. By default: false. |
duplicateWindow |
Duplicate verification window in milliseconds. Disabled by default (0). |
subjects |
List of stream subjects separated by a comma. |
placement |
Placement directive. List of values separated by commas, made up of a cluster name followed by a list of labels. Not entered by default. |
republish |
Republish configuration in the form of a list of key/value pairs separated by commas.
source |
Source subject |
destination |
Destination subject |
headersOnly |
Replicates headers only |
|
|
|
subjectTransform |
Subject transformation in the form of a key/value pair. The key is the source subject name and the value is the destination subject name. |
consumerLimits |
Subject transformation list in the form of a list of key/value pairs separated by commas.
inactiveThreshold |
Time after which the consumer is considered to be inactive (in milliseconds) |
maxAckPending |
Maximum number of pending acknowledgments |
|
|
|
allowRollup |
Allows roll-up. Boolean, false by default. |
allowDirect |
Allows direct access. Boolean, false by default. |
mirrorDirect |
Allows direct access for mirrors. Boolean, false by default. |
discardNewPerSubject |
Defines if the "new" discardPolicy parameter applies to all subjects. By default, it applies only to new subjects. Boolean, false by default. |
metaData |
Stream metadata. List of key/value pairs separated by commas. |
|
ALPHA | Mirror | Description of a mirror source in the form of a list of key/value pairs separated by commas. This parameter cannot be specified at the same time as the Sources parameter or if the stream has sources configured.
The accepted options are:
name |
Source stream name |
startSeq |
Start sequence number |
startTime |
Start time |
filterSubject |
Subject to filter |
external |
Definition of an external in the form of a list of key/value pairs separated by commas. This parameter cannot be specified at the same time as the domain parameter.
api |
API prefix |
deliver |
Subject deliver |
|
|
|
|
ALPHA[n]
| Sources | Stream source definition table. The source description is identical to the Mirror parameter. This parameter cannot be specified at the same time as the Mirror parameter or if the stream has a mirror configured. |
NUM_BIN_4 | SourceLength | Length of a source array element. |
NUM_BIN_4
| NumberSources | Number of elements to include in the Source array. |
NUM_BIN_4 | Rc | Function return code. The possible values are provided in NatsLastError function documentation. Output parameter. |
Example
...
CALL_DLL 'NatsToolBx' 'NatsUpdateStream' Handle 'ORDERS' 'subjects: order.*,custom_orders.*' *BLANK sources 250 0 Rc
↑ Top of page