Products Downloads


French version


 

This function is used to connect to a NATS server.


Context

  • Windows client

  • Windows server

  • Java client

  • Java server

  • Adelia Web Client

  • Adelia Cloud client

  • Event Adelia client


Parameters

ALPHA

URLs

List of NATS access URLs, separated by the ";" character.

If the parameter is empty, a connection is made to the local server (nats://localhost:4222).

ALPHA

Options

List of connection options in the form of a list of key/value pairs separated by semi-colons.

The accepted options are:

clientID Client ID
creds_file Name of a file containing the NATS connection identifiers (Token + NKEY)
nkey User’s private key, for connection via user key
nkey_file Name of a file containing the user's private key, for connection via user key
password User's password
token JWT for connection via user token
token_file Name of a file containing a JWT, for connection via user token
user User name for a user/password connection

NUM_BIN_4

Handle

Connection ID Output parameter.

NUM_BIN_4

Rc

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



Example

NUM_BIN_4  Handle
ALPHA(250) Url
ALPHA(250) Options
...

Url = 'nats://localhost:4222'

Options = 'nkey_file: c:\credentials\username.s.txt'

CALL_DLL 'NatsToolBx' 'NatsConnect' Url Options Handle Rc


↑ Top of page



  • Aucune étiquette