Clients - nats : StreamingProducer

Constructor

__init

(Connection conn, string? clientId, string clusterId, StreamingConfig? streamingConfig)

  • clusterId string test-cluster

Remote Methods

Methods

publish

(string subject, Content data)

returns string | Error

Publishes data to a given subject.

Parameters

  • subject string
  • NATS subject to publish data

  • Return Type

    (string | Error)
  • string value representing the NUID (NATS Unique Identifier) of the published message, if the message gets successfully published and acknowedged by the NATS server OR nats/Error with nuid and message fields in case an error occurs in publishing, the timeout elapses while waiting for the acknowledgement OR nats/Error only with the message field in case an error occurrs even before publishing is completed

close

()

returns error?

Close the producer.

  • Return Type

    (error?)
  • Retruns () or the error if unable to complete the close operation.