Products Downloads


French version


 

This function is used to retrieve the parameter values from a stream (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

Key

Name of the parameter to be retrieved. The possible values are as follows:

description
Stream description
retentionPolicy Retention policy(limits, interest, workqueue)
compressionOption Compression option (none, s2)
storageType Storage type (file, memory)
discardPolicy Discard policy (new, old)
maxConsumers Maximum number of associated consumers. Not entered by default (-1).
maxMessages Maximum number of messages. Not entered by default (-1).
maxMessagesPerSubject 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.source Republish source
republish.destination

Republish destination

republish.headersOnly

Header republish only

subjectTransform

Subject transformation list

You can retrieve the list size with the subjectTransform[?] key and a discrete value with subjectTransform[index]

consumerLimits.inactiveThreshold Time after which the consumer is considered to be inactive (in milliseconds)
consumerLimits.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.
denyDelete Prevents message deletion. Boolean, false by default.
denyPurge Prevents messages being purged from the stream. 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.

You can retrieve the number of elements with the metadata[?] key and a metadata['key'] metadata value.

firstSequence Sequence number of the first message. Positive integer. By default: 1.
mirror.name
Source stream name
mirror.startSeq
Start sequence number
mirror.startTime
Start time
mirror.filterSubject
Subject to filter
mirror.external.api
API prefix
mirror.external.deliver
Subject deliver
sources[?]
Number of sources
sources[index].name Source stream name
sources[index].startSeq
Start sequence number
sources[index].startTime
Start time
sources[index].filterSubject
Subject to filter
sources[index].external.api
API prefix
sources[index].external.deliver
Subject deliver

ALPHA

Value

Parameter value. Output parameter.

NUM_BIN_4

ValueLgth

Value parameter length.

NUM_BIN_4

Rc

Function return code. The possible values are provided in NatsLastError function documentation. Output parameter.



Example

ALPHA(128) Param
ALPHA(128) Buffer
NUM_BIN_4  NumberSources

/* lists the sources in the stream
CALL_DLL 'NatsToolBx' 'NatsQueryStream' Handle 'ORDERS' 'Sources[?]' Buffer 128 Rc

NumberSources= &ALPHA_TO_NUM(Buffer)

I = 1
DO_WHILE i <= NumberSources
    Param = 'Sources[' /// &NUM_TO_ALPHA(I) /// '].name'
    CALL_DLL 'NatsToolBx' 'NatsQueryStream' Handle 'ORDERS' Param Buffer 128 Rc
    ...
    I = I + 1
REDO

↑ Top of page


  • Aucune étiquette