fte:ping Ant task

This IBM WebSphere MQ File Transfer Edition Ant task pings an agent to elicit a response, and so determines if the agent is able to process transfers.

Note: IBM WebSphere MQ File Transfer Edition (FTE) is no longer a supported product. To migrate from FTE to the Managed File Transfer component in IBM MQ, see Migrating Managed File Transfer.


Attributes

    agent
    Required. Specifies the agent to submit the fte:ping request to. The value is in the form: agentname@qmgrname where agentname is the name of the agent and qmgrname is the name of the queue manager that this agent is directly connected to.

    cmdqm
    Optional. The command queue manager to submit the request to. Specify this information in the form qmgrname@host@port@channel, where:

    • qmgrname is the name of the queue manager
    • host is the optional host name of the system where the queue manager is running
    • port is the optional port number that the queue manager is listening on
    • channel is the optional SVRCONN channel to use

    If we omit the host, port, or channel information for the command queue manager, the connection information specified in the command.properties file is used. For more information, see The MFT command.properties file.

    We can use the com.ibm.wmqfte.propertySet property to specify which command.properties file to use. For more information, see com.ibm.wmqfte.propertySet.
    If we do not use the cmdqm attribute, the task defaults to using the com.ibm.wmqfte.ant.commandQueueManager property, if this property is set. If the com.ibm.wmqfte.ant.commandQueueManager property is not set, a connection to the default queue manager, defined in the command.properties file, is attempted. The format of the com.ibm.wmqfte.ant.commandQueueManager property is the same as the cmdqm attribute, that is, qmgrname@host@port@channel.

    rcproperty
    Required. Names a property to store the return code of the ping operation in.

    timeout
    Optional. The maximum amount of time, in seconds, for the task to wait for the agent to respond. The minimum timeout is zero seconds, however a timeout of minus one can also be specified such that the command waits forever for the agent to respond. If no value is specified for the timeout then the default is to wait up to 5 seconds for the agent to respond.


Example

This example sends a fte:ping request to agent1 hosted by qm1. The fte:ping request waits 15 seconds for the agent to respond. The outcome of the fte:ping request is stored in a property called ping.rc.
<fte:ping agent="agent1@qm1" rcproperty="ping.rc" timeout="15"/>


Return codes

    0
    Command completed successfully.

    2
    Command timed out.

Parent topic: fteAnt: run Ant tasks in MFT


Related information