Class ReliableMessagingFeature
- All Implemented Interfaces:
StickyFeature
WebServiceFeature
that configures Metro Reliable Messaging runtime functionality.
Since there is a lot to configure in Reliable Messaging domain, to build create
an instance of ReliableMessagingFeature, use a convenience
ReliableMessagingFeatureBuilder builder class.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines the enumeration of all possible backoff algortihms that can be applied for to message retransmission.static enumDefines the enumeration of Delivery Assurance options, which can be supported by RM Sources and RM Destinations.static enumDefines the enumeration of possible security binding mechanism options that can be applied to a created sequence. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longA constant specifying the default value of interval between sending subsequent acknowledgement request messages.static final longSpecifies the duration in milliseconds after which the RM Destination will transmit an acknowledgement.static final longA constant specifying the default value of close sequence operation timeout.static final longA constant specifying the default value of destination flow control buffer quota.static final longA constant specifying the default value for how many concurrently active RM sessions (measured based on inbound RM sequences) the sequence manager dedicated to the WS Endpoint accepts before starting to refuse new requests for sequence creation.static final longA constant specifies the default value of maximum number of message redelivery attempts.static final longA constant specifies the default value of maximum number of attempts to send a reliable messaging session control messgae such as CreateSequence, CloseSequence and TerminateSequence Currently, the default value is set to 3.static final longA constant specifying the default value of base message retransmission interval.static final booleanA constant specifying the default value for disabling the generation of theOfferelement as part of theCreateSequencemessage.static final booleanA constant specifying the default value for enabling "reject out-of-order messages".static final longA constant specifying the default value of sequence inactivity timeout.static final longDefault period (in milliseconds) of a sequence manager maintenance task execution.static final booleanA constant specifying the default value for turning off state update when received AckRequested is processed at RMD.static final booleanA constant specifying the default value for enabling XA TX at server side RMD.static final intA constant specifying the default value for XA TX timeout that is used at server side RMD (in seconds).static final StringFields inherited from class jakarta.xml.ws.WebServiceFeature
enabled -
Constructor Summary
ConstructorsConstructorDescriptionThis constructor is here to satisfy JAX-WS specification requirementsReliableMessagingFeature(boolean enabled) This constructor is here to satisfy JAX-WS specification requirementsReliableMessagingFeature(boolean enabled, RmProtocolVersion version, long inactivityTimeout, long bufferQuota, boolean orderedDelivery, ReliableMessagingFeature.DeliveryAssurance deliveryAssurance, ReliableMessagingFeature.SecurityBinding securityBinding, boolean persistenceEnabled, long sequenceManagerMaintenancePeriod, long maxConcurrentSessions) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanRetransmitMessage(long nextRetransmissionCount) Returnstrueif the next attempt to retransmit a message indicated bynextRetransmissionCountinput parameter is allowed as per current feature configuration.longSpecifies the duration after which the RM Destination will transmit an acknowledgement.longSpecifies interval between sending subsequent acknowledgement request messages by an RM Source in case of any unacknowledged messages on the sequence.longSpecifies the timeout for aCloseSequenceRequestmessage.Specifies the message delivery quality of service between the RM and application layer.longThis attribute may be used together with ordered delivery requirement.getID()longSpecifies how many concurrently active RM sessions (measured based on inbound RM sequences) the sequence manager dedicated to the WS Endpoint accepts before starting to refuse new requests for sequence creation.longA message is considered to be transferred if its delivery at the recipient has been acknowledged by the recipient.longThe infrastructure tries to send each RM session protocol control message such as CreateSequence, CloseSequence, TerminateSequence at most a#getMaxRmSessionControlMessageResendAttempts()number of times.longSpecifies how long the RM Source will wait after transmitting a message before retransmitting the message if no acknowledgement arrives.Specifies which WS-RM version SOAP messages and SOAP message headers should be used for communication between RM source and RM destinationSpecifies that the retransmission interval will be adjusted using a specific backoff algorithm.Specifies whether each created RM sequence must be bound to a specific underlying security token or secured transport.longSpecifies a period of inactivity for a Sequence in ms.longSpecifies the period (in milliseconds) of a sequence manager maintenance task execution.booleanSpecifies whether the generation of theOfferelement as part of theCreateSequencemessage is forced-disabled or not.booleanSpecifies a requirement that messages from each individual Sequence are to be delivered in the same order they have been sent by the Application Source.booleanSpecifies whether the runtime should use persistent message storage or not.booleanSpecifies whether RMD should reject out-of-order messages that it receives.toString()Methods inherited from class jakarta.xml.ws.WebServiceFeature
isEnabled
-
Field Details
-
ID
- See Also:
-
DEFAULT_SEQUENCE_INACTIVITY_TIMEOUT
public static final long DEFAULT_SEQUENCE_INACTIVITY_TIMEOUTA constant specifying the default value of sequence inactivity timeout. Currently the default value is set to 600000.- See Also:
-
DEFAULT_DESTINATION_BUFFER_QUOTA
public static final long DEFAULT_DESTINATION_BUFFER_QUOTAA constant specifying the default value of destination flow control buffer quota. Currently the default value is set to 32.- See Also:
-
DEFAULT_MESSAGE_RETRANSMISSION_INTERVAL
public static final long DEFAULT_MESSAGE_RETRANSMISSION_INTERVALA constant specifying the default value of base message retransmission interval. Currently the default value is set to 2000.- See Also:
-
DEFAULT_MAX_MESSAGE_RETRANSMISSION_COUNT
public static final long DEFAULT_MAX_MESSAGE_RETRANSMISSION_COUNTA constant specifies the default value of maximum number of message redelivery attempts. Currently, the default value is set to infinity (-1).- See Also:
-
DEFAULT_MAX_RM_SESSION_CONTROL_MESSAGE_RESEND_ATTEMPTS
public static final long DEFAULT_MAX_RM_SESSION_CONTROL_MESSAGE_RESEND_ATTEMPTSA constant specifies the default value of maximum number of attempts to send a reliable messaging session control messgae such as CreateSequence, CloseSequence and TerminateSequence Currently, the default value is set to 3.- See Also:
-
DEFAULT_ACKNOWLEDGEMENT_TRANSMISSION_INTERVAL
public static final long DEFAULT_ACKNOWLEDGEMENT_TRANSMISSION_INTERVALSpecifies the duration in milliseconds after which the RM Destination will transmit an acknowledgement. Currently the default value is set to -1 => unspecified.- See Also:
-
DEFAULT_ACK_REQUEST_TRANSMISSION_INTERVAL
public static final long DEFAULT_ACK_REQUEST_TRANSMISSION_INTERVALA constant specifying the default value of interval between sending subsequent acknowledgement request messages. Currently the default value is set to 2000.- See Also:
-
DEFAULT_CLOSE_SEQUENCE_OPERATION_TIMEOUT
public static final long DEFAULT_CLOSE_SEQUENCE_OPERATION_TIMEOUTA constant specifying the default value of close sequence operation timeout. Currently the default value is set to 3000.- See Also:
-
DEFAULT_SEQUENCE_MANAGER_MAINTENANCE_PERIOD
public static final long DEFAULT_SEQUENCE_MANAGER_MAINTENANCE_PERIODDefault period (in milliseconds) of a sequence manager maintenance task execution.- See Also:
-
DEFAULT_MAX_CONCURRENT_SESSIONS
public static final long DEFAULT_MAX_CONCURRENT_SESSIONSA constant specifying the default value for how many concurrently active RM sessions (measured based on inbound RM sequences) the sequence manager dedicated to the WS Endpoint accepts before starting to refuse new requests for sequence creation. Currently, the default value is set to infinity (-1).- See Also:
-
DEFAULT_OFFER_ELEMENT_GENERATION_DISABLED
public static final boolean DEFAULT_OFFER_ELEMENT_GENERATION_DISABLEDA constant specifying the default value for disabling the generation of theOfferelement as part of theCreateSequencemessage.- See Also:
-
DEFAULT_REJECT_OUT_OF_ORDER_MESSAGES
public static final boolean DEFAULT_REJECT_OUT_OF_ORDER_MESSAGESA constant specifying the default value for enabling "reject out-of-order messages".- See Also:
-
DEFAULT_STATE_UPDATE_ON_RECEIVED_ACKREQUESTED_DISABLED
public static final boolean DEFAULT_STATE_UPDATE_ON_RECEIVED_ACKREQUESTED_DISABLEDA constant specifying the default value for turning off state update when received AckRequested is processed at RMD.- See Also:
-
DEFAULT_XA_TX_FOR_SERVER_RMD
public static final boolean DEFAULT_XA_TX_FOR_SERVER_RMDA constant specifying the default value for enabling XA TX at server side RMD.- See Also:
-
DEFAULT_XA_TX_FOR_SERVER_RMD_TIMEOUT_SECONDS
public static final int DEFAULT_XA_TX_FOR_SERVER_RMD_TIMEOUT_SECONDSA constant specifying the default value for XA TX timeout that is used at server side RMD (in seconds).- See Also:
-
-
Constructor Details
-
ReliableMessagingFeature
public ReliableMessagingFeature()This constructor is here to satisfy JAX-WS specification requirements -
ReliableMessagingFeature
public ReliableMessagingFeature(boolean enabled) This constructor is here to satisfy JAX-WS specification requirements -
ReliableMessagingFeature
public ReliableMessagingFeature(boolean enabled, RmProtocolVersion version, long inactivityTimeout, long bufferQuota, boolean orderedDelivery, ReliableMessagingFeature.DeliveryAssurance deliveryAssurance, ReliableMessagingFeature.SecurityBinding securityBinding, boolean persistenceEnabled, long sequenceManagerMaintenancePeriod, long maxConcurrentSessions)
-
-
Method Details
-
getID
- Specified by:
getIDin classjakarta.xml.ws.WebServiceFeature
-
getProtocolVersion
Specifies which WS-RM version SOAP messages and SOAP message headers should be used for communication between RM source and RM destination- Returns:
- version currently configured for the feature. If not set explicitly,
the default value is specified by a call to
RmProtocolVersion.getDefault().
-
getSequenceInactivityTimeout
@ManagedAttribute public long getSequenceInactivityTimeout()Specifies a period of inactivity for a Sequence in ms.- Returns:
- currently configured sequence inactivity timeout. If not set explicitly,
the default value is specified by
DEFAULT_SEQUENCE_INACTIVITY_TIMEOUTconstant.
-
getSecurityBinding
Specifies whether each created RM sequence must be bound to a specific underlying security token or secured transport.- Returns:
- configured security binding requirement. If not set explicitly, the
default value is specified by a call to
ReliableMessagingFeature.SecurityBinding.getDefault(). - See Also:
-
getDeliveryAssurance
Specifies the message delivery quality of service between the RM and application layer. It expresses the delivery assurance in effect between the RM Destination and its corresponding application destination, and it also indicates requirements on any RM Source that transmits messages to this RM destination. Conversely when used by an RM Source it expresses the delivery assurance in effect between the RM Source and its corresponding application source, as well as indicating requirements on any RM Destination that receives messages from this RM Source. In either case the delivery assurance does not affect the messages transmitted on the wire.- Returns:
- currently configured delivery assurance mode. If not set explicitly,
the default value is specified by a call to
ReliableMessagingFeature.DeliveryAssurance.getDefault(). - See Also:
-
isOrderedDeliveryEnabled
@ManagedAttribute public boolean isOrderedDeliveryEnabled()Specifies a requirement that messages from each individual Sequence are to be delivered in the same order they have been sent by the Application Source. The RM Source will ensure that the ordinal position of each message in the Sequence (as indicated by a message Sequence number) is consistent with the order in which the messages have been sent from the Application Source. The RM Destination will deliver received messages for each Sequence in the order indicated by the message numbering.
In-order delivery can be used in combination with any of the
ReliableMessagingFeature.DeliveryAssurancevalues, and the requirements of those values will also be met. In particular if theReliableMessagingFeature.DeliveryAssurance.AT_LEAST_ONCEorReliableMessagingFeature.DeliveryAssurance.EXACTLY_ONCEvalue is applied and the RM Destination detects a gap in the Sequence then the RM Destination will not deliver any subsequent messages from that Sequence until the missing messages are received or until the Sequence is closed.- Returns:
trueif the ordered delivery si required,falseotherwise. If not set explicitly, the default value isfalse.
-
getDestinationBufferQuota
@ManagedAttribute public long getDestinationBufferQuota()This attribute may be used together with ordered delivery requirement. It specifies the maximum number of out-of-order unprocessed request messages that may be stored in the unprocessed request message buffer within the RM destination before the RM destination starts rejecting new request messages.- Returns:
- currently configured flow control buffer on the destination. If not
set explicitly, the default value is specified by
DEFAULT_DESTINATION_BUFFER_QUOTAconstant.
-
getMessageRetransmissionInterval
@ManagedAttribute public long getMessageRetransmissionInterval()Specifies how long the RM Source will wait after transmitting a message before retransmitting the message if no acknowledgement arrives.- Returns:
- currently configured base retransmission interval. If not set explicitly,
the default value is specified by
DEFAULT_MESSAGE_RETRANSMISSION_INTERVALconstant.
-
getRetransmissionBackoffAlgorithm
@ManagedAttribute public ReliableMessagingFeature.BackoffAlgorithm getRetransmissionBackoffAlgorithm()Specifies that the retransmission interval will be adjusted using a specific backoff algorithm.- Returns:
- currently configured retransmission back-off algorithm that should be
used. If not set explicitly, the default value is specified by a
call to
ReliableMessagingFeature.BackoffAlgorithm.getDefault(). - See Also:
-
getMaxMessageRetransmissionCount
@ManagedAttribute public long getMaxMessageRetransmissionCount()A message is considered to be transferred if its delivery at the recipient has been acknowledged by the recipient. If an acknowledgment has not been received within a certain amount of time for a message that has been transmitted, the infrastructure automatically retransmits the message. By default, the number of retransmissions is not limited. This can be checked by a call to#isMessageRetransmissionLimited()method. In case theisMessageRetransmissionLimited()returnstrue, the infrastructure tries to send the message for at most agetMaxMessageRetransmissionCount()number of times. Not receiving an acknowledgment before this limit is reached is considered to be a fatal communication failure, and causes the RM session to fail. The infrastructure uses a back-off algorithm retrieved viagetRetransmissionBackoffAlgorithm()to determine when to retransmit, based on the configured base retransmission time retrieved via a call togetMessageRetransmissionInterval().- Returns:
- maximum number of message transmission retries
-
canRetransmitMessage
public boolean canRetransmitMessage(long nextRetransmissionCount) Returnstrueif the next attempt to retransmit a message indicated bynextRetransmissionCountinput parameter is allowed as per current feature configuration.- Parameters:
nextRetransmissionCount- indicates the ordinal number of the next (potential) attempt to retransmit a single message- Returns:
trueif it is possible to retransmit a message,falseotherwise.- See Also:
-
getMaxRmSessionControlMessageResendAttempts
@ManagedAttribute public long getMaxRmSessionControlMessageResendAttempts()The infrastructure tries to send each RM session protocol control message such as CreateSequence, CloseSequence, TerminateSequence at most a#getMaxRmSessionControlMessageResendAttempts()number of times. Not receiving an acknowledgment before this limit is reached is considered a fatal communication failure, and causes the RM session to fail.- Returns:
- maximum number of reliable messaging session handshake message transmission attempts
-
getAcknowledgementTransmissionInterval
@ManagedAttribute public long getAcknowledgementTransmissionInterval()Specifies the duration after which the RM Destination will transmit an acknowledgement. Specified in milliseconds.- Returns:
- currently configured acknowledgement transmission interval. If not set explicitly,
the default value is specified by the
DEFAULT_ACKNOWLEDGEMENT_TRANSMISSION_INTERVALconstant.
-
getAckRequestTransmissionInterval
@ManagedAttribute public long getAckRequestTransmissionInterval()Specifies interval between sending subsequent acknowledgement request messages by an RM Source in case of any unacknowledged messages on the sequence.- Returns:
- currently configured acknowledgement request transmission interval.
If not set explicitly, the default value is specified by the
DEFAULT_ACK_REQUEST_TRANSMISSION_INTERVALconstant.
-
getCloseSequenceOperationTimeout
@ManagedAttribute public long getCloseSequenceOperationTimeout()Specifies the timeout for aCloseSequenceRequestmessage. If no response is returned from RM destination before the timout expires, the sequence is automatically closed by the RM source and all associated resources are released.- Returns:
- currently configured close sequence operation timeout. If not set explicitly,
the default value is specified by the
DEFAULT_CLOSE_SEQUENCE_OPERATION_TIMEOUTconstant.
-
isPersistenceEnabled
@ManagedAttribute public boolean isPersistenceEnabled()Specifies whether the runtime should use persistent message storage or not.- Returns:
trueif the runtime should use persistent message storage,falseotherwise
-
getSequenceManagerMaintenancePeriod
@ManagedAttribute public long getSequenceManagerMaintenancePeriod()Specifies the period (in milliseconds) of a sequence manager maintenance task execution.- Returns:
- the period (in milliseconds) of a sequence manager maintenance task execution.
-
getMaxConcurrentSessions
@ManagedAttribute public long getMaxConcurrentSessions()Specifies how many concurrently active RM sessions (measured based on inbound RM sequences) the sequence manager dedicated to the WS Endpoint accepts before starting to refuse new requests for sequence creation.- Returns:
- maximum number of concurrent RM sessions
-
isOfferElementGenerationDisabled
public boolean isOfferElementGenerationDisabled()Specifies whether the generation of theOfferelement as part of theCreateSequencemessage is forced-disabled or not.- Returns:
trueif the generation of theOfferelement as part of theCreateSequencemessage is forced-disabled,falseotherwise.
-
isRejectOutOfOrderMessagesEnabled
public boolean isRejectOutOfOrderMessagesEnabled()Specifies whether RMD should reject out-of-order messages that it receives.- Returns:
trueif RMD should reject out-of-order messages. Default is false.
-
toString
-