This function is used to transmit a binary message to a NATS subject.
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 | Subject | Message subject |
ALPHA | Headers | List of headers for the message, in the form of a list of key/value pairs separated by semi-colons. Several values can be provided for a header by separating them with a comma. If the commas or semi-colons need to appear in the header value, you need to replace them with the following escape characters respectively: %2c and %3b. |
IMAGE | Message | Message body |
NUM_BIN_4 | Rc | Function return code. The possible values are provided in NatsLastError function documentation. Output parameter. |
Example
IMAGE Message
...
CALL_DLL 'VaToolBx' 'VaToolBxAlphaToImage' 'Test message' 'UTF-8' Message Rc2
...
CALL_DLL 'NatsToolBx' 'NatsPublish' Handle 'test.subject' *BLANK Message Rc4