Clients -
nats :
Producer
NATS producer would act as a basic client allowing to publish messages to the NATS server. Producer needs the NATS connection to be initialized.
Constructor
__init
(Connection c)
- c Connection
-
An already-established connection.
Remote Methods
publish
Produces a message to a NATS basic server for the given subject.
request
Produces a message and would wait for a response.
Methods
Produces a message to a NATS basic server for the given subject.
Parameters
- subject string
-
Could also be referred as the 'topic/queue' name.
- data Content
-
Data to publish.
-
Return Type
(Error?) A specific error if there is a problem when publishing the message. Returns () otherwise.