Class JMSRequestProxy
java.lang.Object
no.mnemonic.messaging.requestsink.jms.AbstractJMSRequestBase
no.mnemonic.messaging.requestsink.jms.JMSRequestProxy
- All Implemented Interfaces:
javax.jms.ExceptionListener
,no.mnemonic.commons.component.LifecycleAspect
,no.mnemonic.commons.metrics.MetricAspect
,no.mnemonic.commons.utilities.AppendMembers
public class JMSRequestProxy
extends AbstractJMSRequestBase
implements no.mnemonic.commons.metrics.MetricAspect
A JMSRequestProxy is the listener component handling messages sent from a
JMSRequestSink
, dispatching them to the configured RequestSink
.
The JMSRequestProxy listens to messages on a JMS queue or topic, and will unpack the message, signal the downstream RequestSink, and handle any replies.
Each request will be run in a separate thread, and the maxConcurrentCalls
parameter
puts a limit on the maximum requests being handled. If more messages are sent to the JMS queue, these will
not be consumed by the JMS Request Sink until a thread is available.
This allows multiple JMSRequestProxies to share the load from a queue, and acts as a resource limitation.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
Nested classes/interfaces inherited from class no.mnemonic.messaging.requestsink.jms.AbstractJMSRequestBase
AbstractJMSRequestBase.BaseBuilder<T extends AbstractJMSRequestBase.BaseBuilder>
-
Field Summary
Fields inherited from class no.mnemonic.messaging.requestsink.jms.AbstractJMSRequestBase
DEFAULT_MAX_MAX_MESSAGE_SIZE, DEFAULT_PRIORITY, MESSAGE_TYPE_CHANNEL_REQUEST, MESSAGE_TYPE_CHANNEL_SETUP, MESSAGE_TYPE_CLIENT_RESPONSE_ACKNOWLEDGEMENT, MESSAGE_TYPE_END_OF_FRAGMENTED_MESSAGE, MESSAGE_TYPE_EXCEPTION, MESSAGE_TYPE_EXTEND_WAIT, MESSAGE_TYPE_SIGNAL, MESSAGE_TYPE_SIGNAL_FRAGMENT, MESSAGE_TYPE_SIGNAL_RESPONSE, MESSAGE_TYPE_STREAM_CLOSED, PROPERTY_DATA_CHECKSUM_MD5, PROPERTY_FRAGMENTS_IDX, PROPERTY_FRAGMENTS_TOTAL, PROPERTY_MESSAGE_TYPE, PROPERTY_REQ_TIMEOUT, PROPERTY_RESPONSE_ID, PROPERTY_SEGMENT_WINDOW_SIZE, PROPERTY_SERVER_NODE_ID, PROTOCOL_VERSION_KEY, SERIALIZER_KEY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
static JMSRequestProxy.Builder
builder()
no.mnemonic.commons.metrics.Metrics
void
onException
(javax.jms.JMSException e) void
void
Methods inherited from class no.mnemonic.messaging.requestsink.jms.AbstractJMSRequestBase
appendMembers, createSession, toString
-
Method Details
-
getMetrics
public no.mnemonic.commons.metrics.Metrics getMetrics() throws no.mnemonic.commons.metrics.MetricException- Specified by:
getMetrics
in interfaceno.mnemonic.commons.metrics.MetricAspect
- Throws:
no.mnemonic.commons.metrics.MetricException
-
startComponent
public void startComponent()- Specified by:
startComponent
in interfaceno.mnemonic.commons.component.LifecycleAspect
-
stopComponent
public void stopComponent()- Specified by:
stopComponent
in interfaceno.mnemonic.commons.component.LifecycleAspect
-
onException
public void onException(javax.jms.JMSException e) - Specified by:
onException
in interfacejavax.jms.ExceptionListener
-
addJMSRequestProxyConnectionListener
public void addJMSRequestProxyConnectionListener(JMSRequestProxy.JMSRequestProxyConnectionListener listener) -
builder
-