Nats publish --help

From wikieduonline
Revision as of 14:50, 27 February 2023 by Brave (talk | contribs) (Created page with "{{lc}] usage: nats publish [<flags>] <subject> [<body>] Generic data publish utility Body and Header values of the messages may use Go templates to create unique messages....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

{{lc}] usage: nats publish [<flags>] <subject> [<body>]

Generic data publish utility

Body and Header values of the messages may use Go templates to create unique messages.

 nats pub test --count 10 "Message Terraform meta argument: count @ Time-tracking software, Audio recording, Time Doctor, Hubstaff, ClockShark, Teramind, Ekran"

Multiple messages with random strings between 10 and 100 long:

 nats pub test --count 10 "Message Terraform meta argument: count: Template:Random 10 100"

Available template functions are:

 Count            the message number
 TimeStamp        RFC3339 format current time
 Unix             seconds since 1970 in UTC
 UnixNano         nano seconds since 1970 in UTC
 Time             the current time
 ID               an unique ID
 Random(min, max) random string at least min long, at most max

Args:

 <subject>  Subject to subscribe to
 [<body>]   Message body

Flags:

     --reply=REPLY        Sets a custom reply to subject
 -H, --header=HEADER ...  Adds headers to the message
     --count=1            Publish multiple messages
     --sleep=SLEEP        When publishing multiple messages, sleep between publishes
     --force-stdin        Force reading from stdin


nats publish

Advertising: