Administration Console Online Help

Previous Next Open TOC in new window
Content starts here

JMS Connection Factory: Configuration: Client

Configuration Options     Related Tasks     Related Topics

Use this page to define the client configuration parameters for this JMS connection factory, such as client id for durable subscribers, acknowledge policy, etc.

Configuration Options

Name Description
Client ID for Durable Subscribers

An optional client ID for a durable subscriber that uses this JMS connection factory. Configuring this value on the connection factory prevents more than one JMS client from using a connection from the factory.

Generally, JMS durable subscriber applications set their client IDs dynamically using the javax.jms.Connection.setClientID() call.

MBean Attribute (Does not apply to application modules) :
ClientParamsBean.ClientId

Client ID Policy for Durable Subscribers

Early access feature: An optional client ID policy that indicates whether the client id can be used by more than one application or not. Configuring this value to one of the valid values listed below would make the durable subscriber behave appropriately.

The valid values are: CLIENT_ID_POLICY_RESTRICTED - Only one connection that uses this same policy can exist in the cluster at any given time for a particular clientID. CLIENT_ID_POLICY_UNRESTRICTED - Connections created using this policy can specify any ClientID, even when other restricted or unrestricted connections already use the same ClientID.

Subscription Sharing Policy

Early access feature: Gets the SubscriptionSharingPolicy on this connection This attribute is dynamically changeable, but the new value will only take effect for the future connections, and will have no impact to the connections that were created before the value was changed.

The valid values are: Exclusive - All subscribers created using this connection factory will not share its subscriptions with any other subscribers. Sharable - Subscribers created using this connection factory can share their subscriptions with other subscribers, no matter if those subscribers are created using the same connection factory or not

Maximum Messages per Session

The maximum number of messages that can exist for an asynchronous session and that have not yet been passed to the message listener. When the Synchronous Prefetch Mode is enabled, this value also affects synchronous sessions with a message consumer that will prefetch messages in one server access.

A value of -1 indicates that there is no limit on the number of messages. In this case, however, the limit is set to the amount of remaining virtual memory.

When the number of messages reaches the MessagesMaximum value:

  • For multicast sessions, new messages are discarded according the policy specified by the OverrunPolicy parameter and a DataOverrunException is thrown.

  • For non-multicast sessions, new messages are flow-controlled, or retained on the server until the application can accommodate the messages.

For multicast sessions, when a connection is stopped, messages will continue to be delivered, but only until the MessagesMaximum value is reached. Once this value is reached, messages will be discarded based on the Overrun policy.

MBean Attribute (Does not apply to application modules) :
ClientParamsBean.MessagesMaximum

Prefetch Mode for Synchronous Consumer

Specifies whether a synchronous consumer will prefetch messages (that is, messages sent from the server to the client) in one server access.

  • Disabled

    - Indicates that message prefetching is disabled.

  • Enabled

    - Indicates that a synchronous consumer (queue receiver or topic subscriber) will prefetch messages. The amount of prefetched messages cannot exceed the maximum number of messages defined by the Messages Maximum parameter.

  • Topic Subscriber Only

    - Indicates that only a synchronous topic subscriber will prefetch messages. The amount of prefetched messages cannot exceed the maximum number of messages defined by the Messages Maximum parameter.

Synchronous message prefetching does not support the following conditions, and will throw a JMS Exception when encountered:

  • User (XA) transactions for synchronous message receives

  • Multiple synchronous consumers per session (regardless of queue or topic)

This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

MBean Attribute (Does not apply to application modules) :
ClientParamsBean.SynchronousPrefetchMode

Multicast Overrun Policy

The policy to use when the number of outstanding multicast messages reaches the value specified in MessagesMaximum and some messages must be discarded.

  • Keep New

    - Indicates that the most recent messages are given priority over the oldest messages, and the oldest messages are discarded, as needed.

  • Keep Old

    - Indicates that the oldest messages are given priority over the most recent messages, and the most recent messages are discarded, as needed.

Message age is defined by the order of receipt, not by the JMSTimestamp value.

MBean Attribute (Does not apply to application modules) :
ClientParamsBean.MulticastOverrunPolicy

Allow Close() Within onMessage()

Specifies whether the connection factory creates message consumers that allow a close() method to be issued within its onMessage() method call.

  • If enabled, a close() method call from within an onMessage() method call will succeed instead of blocking forever. If the acknowledge mode of the session is set to AUTO_ACKNOWLEDGE, the current message will still be acknowledged automatically when the onMessage() call completes.

  • If disabled, it will cause the stop() and close() methods to hang if called from onMessage() .

This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

MBean Attribute (Does not apply to application modules) :
ClientParamsBean.AllowCloseInOnMessage

Client Acknowledge Policy

Acknowledge policy for non-transacted sessions that use the CLIENT_ACKNOWLEDGE mode. All indicates that calling acknowledge on a message acknowledges all unacknowledged messages received on the session. Previous specifies that calling acknowledge on a message acknowledges only unacknowledged messages up to, and including, the given message.

This parameter works around a change in the JMS specification and only applies to implementations that use the CLIENT_ACKNOWLEDGE acknowledge mode for a non-transacted session. Specifically, the specification allowed users to acknowledge all messages before and including the message being acknowledged. The specification was changed so that acknowledging any message acknowledges all messages ever received (even those received after the message being acknowledge).

ACKNOWLEDGE_PREVIOUS retains the old behavior (acknowledge all message up to and including the message being acknowledged). Whereas, ACKNOWLEDGE_ALL yields the new behavior, where all messages received by the given session are acknowledged regardless of which message is being used to effect the acknowledge.

MBean Attribute (Does not apply to application modules) :
ClientParamsBean.AcknowledgePolicy

Reconnect Policy

Specifies which types of JMS clients will be explicitly and implicitly refreshed after a lost network connection with a server or upon a server reboot. For example, selecting the Producers option will explicitly refresh JMS Producers and implicitly refresh any related Session and Connection clients.

  • None

    Do not refresh any JMS clients derived from this connection factory.

  • Producers

    Refresh all JMS Producer clients derived from this connection factory. This option does not refresh Consumers, QueueBrowsers, or Connections with a configured Client ID for a durable subscriber.

  • All

    Refresh all JMS Consumer and Producer clients derived from this connection factory, including Connections with a configured Client ID for a durable subscriber. This option does not refresh QueueBrowser clients.

This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

MBean Attribute (Does not apply to application modules) :
ClientParamsBean.ReconnectPolicy

Reconnect Blocking Time

The maximum length of time, in milliseconds, that any synchronous JMS calls, such as a producer.send(), consumer.receive(), or session.createBrowser(), will block the calling thread before giving up on a JMS client reconnect in progress.

This attribute is effective only if the Reconnect Policy option is set to either Producers or All. A value of 0 will cause synchronous JMS calls to not wait for any reconnect in progress; a value of -1 will cause an infinite wait for a reconnect.

This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

MBean Attribute (Does not apply to application modules) :
ClientParamsBean.ReconnectBlockingMillis

Total Reconnect Period

The maximum length of time, in milliseconds, that JMS clients (particularly asynchronous consumers) will continue to try to reconnect to the server after either the initial network disconnect or the last synchronous call attempt, whichever occurred most recently, before giving up retrying.

This attribute is effective only if the ReconnectPolicy attribute is set to either Producers or All. The default value of -1 means that that it will keep trying to reconnect indefinitely; a value of 0 means that there would be exactly one retry attempt.

This attribute is dynamic and can be changed at any time. However, changing the value does not affect existing connections. It only affects new connections made with this connection factory.

MBean Attribute (Does not apply to application modules) :
ClientParamsBean.TotalReconnectPeriodMillis

Related Tasks

Related Topics


Back to Top