Products Downloads


French version


 

This function is used to retrieve the parameter values from a JetStream consumer.


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

Consumer

Consumer’s name

ALPHA

Key

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

description Consumer description
deliverPolicy Delivery policy (all, last, new, by_start_sequence, by_start_time, last_per_subject)
ackPolicy Acknowledgment policy (none, all, explicit)
replayPolicy Replay policy (original, instant)
durable Durable name
deliverSubject Delivery subject
deliverGroup
Delivery group
sampleFrequency

Sample frequency (string)

startTime Start date in the form of an ISO timestamp with time zone (e.g. 2007-12-03T10:15Z or 2007-12-03T11:15+01:00)
ackWait Acknowledgment wait time in milliseconds (0 by default)
idleHeartbeat Idle message wait time in milliseconds (0 by default)
maxExpires Maximum expiration time in milliseconds for a "pull" request (0 by default)
inactiveThreshold Wait time in milliseconds before the consumer is considered inactive (0 by default)
startSequence Consumer start sequence number (0 by default)
maxDeliver Max number of messages delivered to the consumer (0 by default)
rateLimit Rate limit in bits per second (0 by default)
maxAckPending Maximum number of pending acknowledgments (0 by default)
maxPullWaiting Maximum number of pending pulls (0 by default)
maxBatch Maximum size of a batch for a pull request (0 by default)
maxBytes Maximum data size (in bytes) for a pull request (0 by default)
numReplicas Maximum number of replicas (0 by default)
flowControl Enables flow control and defines the idle heartbeat time (0 by default).
headersOnly Transmits message headers only. Boolean. By default: false.
memStorage Forces the storage of the consumer's state in memory instead of inheriting the stream configuration. Boolean. By default:  false.
backoff

List of times in the form of a list of integer numbers separated by commas. Overloads the ackWait parameter.

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

metadata

Consumer metadata

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

filterSubjects

List of subjects to filter in the consumer.

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

ALPHA

Value

Parameter value. Output parameter.

NUM_BIN_4

ValueLgth

Value variable size.

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  NumberSubjects

/* lists the subjects filtered by the consumer
CALL_DLL 'NatsToolBx' 'NatsQueryConsumer' Handle 'ORDERS' 'Orders' 'filterSubjects[?]' Buffer 128 Rc

NumberSubjects = &ALPHA_TO_NUM(Buffer)

I = 1
DO_WHILE i <= NumberSubjects
    Param = 'filterSubjects[' /// &NUM_TO_ALPHA(I) /// ']'
    CALL_DLL 'NatsToolBx' 'NatsQueryConsumer' Handle 'ORDERS' 'Orders' Param Buffer 128 Rc
    ...
    I = I + 1
REDO


↑ Top of page


  • Aucune étiquette