Hitachi

Hitachi Application Server V10 Command Reference Guide (For UNIX® Systems)


2.19.3 create-jmsdest

Creates a JMS physical destination.

Synopsis

asadmin [asadmin-options] create-jmsdest [--help] --desttype dest_type
    [--property name=value[:name=value]...] [--target target]
    [--force={false|true}] dest_name

Storage location

Application Server installation directory/javaee/glassfish/bin

Function

The create-jmsdest subcommand creates a Java Message Service (JMS) physical destination.

This subcommand is supported in remote mode only.

Typically, you use the create-jms-resource subcommand to create a JMS destination resource that has a Name property that specifies the physical destination. The physical destination is created automatically when you run an application that uses the destination resource. Use the create-jmsdest subcommand if you want to create a physical destination with non-default property settings.

Precondition

DAS has to be in a running state.

Arguments

--help | -?

Displays the help text for the subcommand.

--desttype dest_type

Specifies the type of the JMS destination.

Type: String

The following values can be specified:

  • topic

  • queue

Default value: N/A

--property name=value[:name=value]...

Specifies the optional attribute name/value pairs required to configure the physical destination. The specification format is name=value. Use a colon (:) to separate property names. If you specify the same property name more than once, the property value specified last is valid.

To modify the value of these properties, you can use them Application Server installation directory/javaee/glassfish/mq/bin/imqcmd command.

Type: String

The following values can be specified:

  • MaxNumMsgs=value

    Allows you to select the maximum number of unconsumed messages permitted for the destination. A value of -1 denotes an unlimited number of messages. The default value is -1. For the dead message queue, the default value is 1000. If the limitBehavior property is set to FLOW_CONTROL, it is possible for the specified message limit to be exceeded because the broker cannot react quickly enough to stop the flow of incoming messages. In such cases, the value specified for maxNumMsgs serves as merely a hint for the broker rather than a strictly enforced limit.

    Type: Integer

    Default value: 1000 for dead message queue and -1 for others.

    Range Value: -1 to 2147483647

  • MaxBytesPerMsg=value

    Displays the maximum size (in bytes) of a single message. The rejection of a persistent message is reported to the producing client with an exception; no notification is sent for non-persistent messages. The value may be expressed in bytes, kilobytes, or megabytes, using the following suffixes:

    b: Bytes

    k: Kilobytes (1024 bytes)

    m: Megabytes (1024 x 1024 = 1,048,576 bytes)

    A value with no suffix is expressed in bytes; a value of -1 denotes an unlimited message size. The default value is -1.

    Type: Integer

    Default value: -1

    Range Value: -1 to 2147483647

  • MaxTotalMsgBytes=value

    Displays the maximum total memory (in bytes) for unconsumed messages. The default value is -1. The syntax is the same as for maxBytesPerMsg. For the dead message queue, the default value is 10 m.

    Type: Integer

    Default value: 10m for dead message queue, -1 for others.

    Range Value: -1 to 2147483647

  • LimitBehavior=value

    Displays the behavior of the message queue broker when the memory-limit threshold is reached.

    The following values can be specified:

    REJECT_NEWEST:

    Rejects the newest messages and notifies the producing client with an exception only if the message is persistent. This is the default value.

    FLOW_CONTROL:

    Slows the rate at which message producers send messages. If the limitBehavior property is set to FLOW_CONTROL, it is possible for the specified message limit to be exceeded the maxNumMsgs because the broker cannot react quickly enough to stop the flow of incoming messages. In such cases, the value specified for maxNumMsgs serves as merely a hint for the broker rather than a strictly enforced limit.

    REMOVE_OLDEST:

    Removes the oldest messages.

    REMOVE_LOW_PRIORITY:

    Removes the lowest-priority messages according to age, with no notification to the producing client. If the value is REMOVE_OLDEST or REMOVE_LOW_PRIORITY and the useDMQ property is set to true, the excess messages are moved to the dead message queue. For the dead message queue itself, the default limit behavior is REMOVE_OLDEST, and the value cannot be set to FLOW_CONTROL.

    Type: String

    Default value: REJECT_NEWEST

    Range: String

  • MaxNumProducers=value

    Displays the maximum number of message producers for a destination. When this limit is reached, no new producers can be created. A value of -1 denotes an unlimited number of producers. The default value is 100. This property does not apply to the dead message queue.

    Type: Integer

    Default value: 100

    Range Value: -1 and 1 to 2147483647

  • ConsumerFlowLimit=value

    Displays the maximum number of messages that can be delivered to a consumer in a single batch. A value of -1 denotes an unlimited number of messages. The default value is 1000. The client runtime can override this limit by specifying a lower value on the connection factory object. In load-balanced queue delivery, this is the initial number of queued messages routed to active consumers before load balancing begins.

    Type: Integer

    Default value: 1000

    Range Value: -1 to 2147483647

  • UseDMQ=value

    If set to true, the dead messages go to the dead message queue. If set to false, the dead messages are discarded. The default value is true.

    Type: Boolean

    Default value: true

    Range Value:

    The following values can be specified:

    true

    false

  • ValidateXMLSchemaEnabled=value

    If set to true, XML schema validation is enabled for the destination. The default value is false. When XML validation is enabled, the Message Queue client runtime will attempt to validate an XML message against the specified XSDs (or against the DTD, if no XSD is specified) before sending it to the broker. If the specified schema cannot be located or the message cannot be validated, the message is not sent, and an exception is thrown. This property should be set when a destination is inactive, that is, when it has no consumers or producers and when there are no messages in the destination. Otherwise the producer must reconnect.

    Type: Boolean

    Default value: false

    Range Value:

    The following values can be specified:

    true

    false

  • XMLSchemaURIList=value

    Comprises a space-separated list of XML schema document (XSD) URI strings. The URLs point to the location of one or more XSDs to use for XML schema validation, if validateXMLSchemaEnabled is set to true. The default value is null. Use double quotes around this value if multiple URIs are specified, as in the following example:

    http://foo/flap.xsd http://test.com/test.xsd

    If this property is not set or is null and the XML validation is enabled. The XML validation is performed using a DTD specified in the XML document. If an XSD is changed as a result of changing application requirements, all client applications that produce XML messages based on the changed XSD must reconnect to the broker.

    Type: String

    Default value: null

    Range Value: String (list of space-separated XSD URI strings)

Default value: N/A

--target target

Creates the physical destination only for the specified target. Although the create-jmsdest subcommand is related to resources, a physical destination is created using the JMS Service (JMS Broker), which is part of the configuration.

Type: String

The following values can be specified:

  • server

    Creates the physical destination for the default server instance. This is the default value.

  • configuration-name

    Creates the physical destination in the specified configuration.

  • cluster-name

    Creates the physical destination for every server instance in the specified cluster.

  • instance-name

    Creates the physical destination for the specified server instance.

Default value: server

--force={false|true}

Specifies whether the subcommand overwrites the existing JMS physical destination of the same name.

Type: Boolean

The following values can be specified:

  • true

  • false

Default value: false

dest_name

Displays a unique identifier for the JMS destination to be created.

Type: String

The following values can be specified:

  • Name of the physical destination

Default value: N/A

Examples

The following example creates a JMS physical queue named PhysicalQueue with non-default property values on the server instance instance1.

asadmin create-jmsdest --target instance1 --desttype queue --property 
maxNumMsgs=1000:maxBytesPerMsg=5k PhysicalQueue

Exit Status

Exit Status

Explanation

0

command executed successfully.

1

error in executing the command.