Skip to content

Latest output position

This API returns the latest position merged by the merger or -1 in case of error.

To call the REST API, you can use:

Endpoint

The $ENDPOINT variable below is defined as an IPC connection to the rest proxy.

bash-4.4$ cd /opt/kx/app/rt/replicator/clib/
bash-4,4$ ./rest_proxy --endpoint $ENDPOINT --target latest-out-position

Endpoint

The $ENDPOINT variable below is defined as an IPC connection to the rest process of any sequencer nodes.

bash-4.4$ curl http://$ENDPOINT/latest-out-position

Note

This query can be called directly on a sequencer node.

bash-4.4$ curl http://0:6000/latest-out-position

Response

The response includes a response header and a payload, where the payload members are:

member type description
latestOutPosition integer Latest position merged by the merger.

Example

Endpoint

An example of the $ENDPOINT variable is kxi-mystream-1:5002.

bash-4.4$ cd /opt/kx/app/rt/replicator/clib/
bash-4,4$ ./rest_proxy --endpoint $ENDPOINT --target latest-out-position
{"latestOutPosition":15861019}

Endpoint

An example of the $ENDPOINT variable is kxi-mystream-1:6000.

bash-4.4$ curl http://$ENDPOINT/latest-out-position
{"latestOutPosition":15861019}

Note

First, you must connect to a sequencer node.

bash-4.4$ curl http://0:6000/latest-out-position
{"latestOutPosition":15861019}