Command cat - galan/plunger GitHub Wiki

The cat-command retrieves messages from the message-provider, either browsing (only retrieving, but not removing) or consuming (removed from the destination).

For each message the properties and body will be displayed; the output is human-readable. For further processing (see pput) a simple format is available, where each message is displayed in one line.

Syntax

pcat <target> [options] (short for plunger <target> -C cat [options])

Example output

Consume messages on the specified destination (normally colored)

$ pcat target -r
JMSDeliveryMode: 2
JMSDestination: HornetQQueue[testing]
JMSMessageID: ID:0566f28b-c9c2-11e2-9b79-0024e8431f8e
JMSPriority: 4
JMSRedelivered: false
JMSReplyTo: 
JMSTimestamp: 1369984163104 (2013-05-31 09:09:23 CEST)
JMSXDeliveryCount: 0
myproperty: sample
Hello world!

Command line arguments

Available via pcat --help

  • -b,--body / When set, the body will be omitted.
  • -c,--cut / Cuts the body after n characters, adding ... when characters were removed.
  • -e,--escape / Escapes the message. When the output is intended for further processing, this switch will map all output to single line. JMS-properties are formatted as json, the body is escaped as well. This form is required for put.
  • -n,--limit / Limits the messages to the first n elements in a queue or received by a topic.
  • -p,--properties / When set, the properties will be omitted.
  • -r,--remove / Read messages will also be removed from the queue.
  • -s,--selector / selector to filter the targets result. (JMS)
⚠️ **GitHub.com Fallback** ⚠️