Skip to content
Daniel Galán y Martins edited this page Sep 13, 2015 · 3 revisions

put adds messages to a destination. Each message is represented by a simple format in the form <properties>\tbody, where properties are a simple json-encoded array, separated by a tab from the body. Messages can be passed by stdin or a file.

Syntax

pput <target> [options] (short for plunger <target> -C put [options])

Example

Simple message with and without a property

$ echo -e "{}\tHello world!" | pput target
$ echo -e "{\"myproperty\":\"sample\"}\tHello\nworld!" | pput target

Time to live

You can define the time the message is kept by the messaging-server. The ttl is written in a human readable syntax, where the amount and unit of time are written as pair. Units are:

  • ms = milliseconds
  • s = seconds
  • m = minutes
  • h = hours
  • d = days

Examples

$ pput target -t "1m" # TTL 1 minute
$ pput target -t "2h 5m 10s" # TTL 2 hours, 5 minutes and 10 seconds

Command line arguments

Available via pput --help

  • -f,--file / file with escaped messages (instead of stdin).
  • -p,--priority / Priority.
  • -s,--skip / skip lines with errors.
  • -t,--ttl / Time to live, see documentation for format.
  • -r,--routingkey / Routingkey (AMQP)
Clone this wiki locally