jmslist_listeners  jmsmanage_listeners

Chapter 12: Using jagtool and jagant

jmslist_messages

Description

Lists the messages in the specified message queue.

Syntax

Local mode support: No.

Command line:

jmslist_messages connect-args [-maximum #messages]
[-selector expression]
MessageQueue:QueueName

Ant build file:

<jag_jmslist_messages [“maximum = #messages]
[“selector = expression”]
type=”MessageQueue:QueueName” />

Option

Description

Default

Required

connect-args

Arguments to specify a connection to the server. See “Using connected mode”.

-

Yes

#messages

The maximum number of messages to list. If 0 or a negative number, all messages are listed.

100

No

expression

A selector expression. Only messages that match the selector expression are returned. If set to true, all messages are returned. The number of these messages that are listed is determined by #messages.

true

No

Returns

Return value

Indicates

0

The command ran successfully; the result is true/success.

2

The command did not run successfully; an exception was thrown.

Examples

Example 1

This command line example lists the first 25 messages in “MyQueue”:

jagtool jmslist_messages -maximum 25 MessageQueue:MyQueue

Example 2

This example does the same in an Ant build file:

<jag_jmslist_messages “maximum=25” type="MessageQueue:MyQueue" />




Copyright © 2005. Sybase Inc. All rights reserved. jmsmanage_listeners