High Quality JMS Messaging.

Redirect Output [output]

Syntax:

    output <filename> | console

Redirects the result output to a file or to the console (default). If a filename is specified, the file will be deleted initially and thus further output will not append to it.

The following command uses the "view" command to view the first message of a queue. Because the default output redirection is the console, the result is displayed on the console. Thereafter, the output is redirected to a file "t0.txt" and the first 100 messages are viewed.

Example:

    $pamela> java com.swiftmq.admin.cli.CLI smqp://localhost:4005 QueueConnectionFactory

    Welcome to SwiftMQ!

    Username:
    Password:
    Trying to connect ... connected
    Type 'help' to get a list of available commands.
    > Router 'router1' is available for administration.

    > sr router1
    router1> cc sys$queuemanager/usage
    router1/sys$queuemanager/usage> view t0 0 0

    <?xml version="1.0" encoding="UTF-8"?>
    <result>
      <message index="0" message-key="0" type="BytesMessage">
        <jms-header>
          <JMSDeliveryMode>NON_PERSISTENT</JMSDeliveryMode>
          <JMSDestination>t0@router1</JMSDestination>
          <JMSExpiration>0</JMSExpiration>
          <JMSMessageID>ID:MUELLI/192.168.120.254-10276033151670</JMSMessageID>
          <JMSPriority>4</JMSPriority>
          <JMSRedelivered>false</JMSRedelivered>
          <JMSTimestamp>1027603315167</JMSTimestamp>
        </jms-header>
        <jmsx-header>
          <JMSXUserID>anonymous</JMSXUserID>
        </jmsx-header>
        <jms-vendor-properties/>
        <message-properties>
          <property name="Boolean1" type="java.lang.Boolean" value="true"/>
          <property name="Boolean2" type="java.lang.Boolean" value="false"/>
          <property name="Byte1" type="java.lang.Byte" value="1"/>
          <property name="Byte2" type="java.lang.Byte" value="7"/>
          <property name="Double1" type="java.lang.Double" value="222.22"/>
          <property name="Double2" type="java.lang.Double" value="888.88"/>
          <property name="Float1" type="java.lang.Float" value="4.0"/>
          <property name="Float2" type="java.lang.Float" value="10.0"/>
          <property name="Int1" type="java.lang.Integer" value="4"/>
          <property name="Int2" type="java.lang.Integer" value="10"/>
          <property name="Long1" type="java.lang.Long" value="5"/>
          <property name="Long2" type="java.lang.Long" value="11"/>
          <property name="Short1" type="java.lang.Short" value="6"/>
          <property name="Short2" type="java.lang.Short" value="12"/>
          <property name="String1" type="java.lang.String" value="StringValue1"/>
          <property name="String2" type="java.lang.String" value="StringValue2"/>
        </message-properties>
        <body body-length="56">{1,0,1,255,1,2,3,6,7,0,65,0,66,64,89,6,102,102,102,10
    2,102,64,128,0,0,0,0,0,200,0,0,0,0,0,0,1,44,64,75,192,0,0,0,0,0,0,60,0,7,83,116,
    114,105,110,103,49}</body>
      </message>
    </result>
    <!-- 1 messages displayed, 6 messages total in queue -->
    <!-- If necessary, message body [partly] truncated to 2048 characters -->

    router1/sys$queuemanager/usage> output t0.txt
    router1/sys$queuemanager/usage> view t0 0 100
    router1/sys$queuemanager/usage>_