SonicMQ API

progress.message.jclient.mp
Interface Connection

All Superinterfaces:
Connection
All Known Subinterfaces:
QueueConnection, TopicConnection

public interface Connection
extends Connection

Title: SonicMQ Adaptive Pacing (Managed Client Connection)

Description: Managed Client Connection. This is a wrapper around the standard SonicMQ Connection implementation. It allows all the same functionality as a standard Connection class in all respects. There are additional capabilities that this Connection supports outlined in the general Managed Client specification. By default all Managed Client features are disabled, which allows the JMS wrapper to function as a standard SonicMQ client with no additional capabilities.

Exception Handling

In general, since the delegate model implements a layered set of classes on top of SonicMQ standard JMS API most of the relevant exceptions are re-thrown as Managed Client JMS Exceptions. This does not typically indicate a problem in the Managed Client layer. It is done for the express purpose of making developers aware of the fact that they are using the delegate client.

Developers should check the Linked Exception and stack trace information in order to access the parent exception. In situations where underlying errors cause Managed Client exceptions the error message text will state the specific problem area. In certain situations, particularly where multi-threaded access issues or race conditions may occur the layered exceptions provide a more detailed set of information then the underlying JMS Exceptions, thus adding a safeguard layer to the JMS client.

Note Managed Client Illegal State Exception is usually thrown in situations where the underlying structures (i.e. Connections, Sessions, Producers, Consumers) have become unavailable or null. This does not typically indicate a Managed Client error, but rather supersedes the standard JMS Illegal State Exception that would have been thrown in its place.

Adaptive Pacing

This capability optimizes message producer and consumer performance by adaptively batching up send and receive operations. Each producer and consumer (message processor) is created with a special Pacer Thread that assists in managing the operation batches. Grouping send operations or receive acknowledgements dramatically reduces the number of outstanding acknowledgements as well as latency associated with synchronous message processing. The basic principles of Adaptive Pacing are the same as those found in the Nagle Algorithm used by TCP/IP. Unlike Nagle's solution, Adaptive Pacing facilitates a configurable latency interval. Detailed information about Paced Session implementation may be found at: PacerThread.

General Function Overview

If Adaptive Pacing has been enabled on this connection the createSession() method returns Adaptive Paced sessions. Such Sessions are inherently transactional from the perspective of the JMS client with a few noted exceptions:

Copyright: Copyright (c) 2006

Company: Progress Software

Version:
2.2
Author:
Dmitry Lelchuk

Method Summary
 boolean getAdaptivePacing()
           
 int getAdaptivePacingBatchSize()
           
 int getAdaptivePacingTimer()
           
 java.lang.String getConnectionName()
           
 void setAdaptivePacing(boolean enableAdaptivePacing)
           
 void setAdaptivePacingBatchSize(int adaptivePacingBatchSize)
           
 void setAdaptivePacingTimer(int adaptivePacingTimer)
           
 
Methods inherited from interface progress.message.jclient.Connection
createSession, getBrokerReconnectURLs, getBrokerURL, getChannel, getConnectID, getConnectionState, getConnectionStateChangeListener, getRoutingNodeName, getStandbyBrokerReconnectURLs, getUnfinishedChannelIDs, getUnfinishedChannels, getUsername, hasUnfinishedChannel, hasUnfinishedChannels, isFaultTolerant, isSecure, setConnectionStateChangeListener, setPingInterval, setRejectionListener
 
Methods inherited from interface javax.jms.Connection
close, createConnectionConsumer, createDurableConnectionConsumer, createSession, getClientID, getExceptionListener, getMetaData, setClientID, setExceptionListener, start, stop
 

Method Detail

getConnectionName

java.lang.String getConnectionName()

setAdaptivePacing

void setAdaptivePacing(boolean enableAdaptivePacing)

getAdaptivePacing

boolean getAdaptivePacing()

setAdaptivePacingBatchSize

void setAdaptivePacingBatchSize(int adaptivePacingBatchSize)

getAdaptivePacingBatchSize

int getAdaptivePacingBatchSize()

setAdaptivePacingTimer

void setAdaptivePacingTimer(int adaptivePacingTimer)

getAdaptivePacingTimer

int getAdaptivePacingTimer()

SonicMQ API

Copyright © 1999-2011 Progress Software Corporation. All Rights Reserved.
HTML formatted on 5-August-2011.