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 enum
Defines the enumeration of all possible backoff algortihms that can be applied for to message retransmission.static enum
Defines the enumeration of Delivery Assurance options, which can be supported by RM Sources and RM Destinations.static enum
Defines the enumeration of possible security binding mechanism options that can be applied to a created sequence. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
A constant specifying the default value of interval between sending subsequent acknowledgement request messages.static final long
Specifies the duration in milliseconds after which the RM Destination will transmit an acknowledgement.static final long
A constant specifying the default value of close sequence operation timeout.static final long
A constant specifying the default value of destination flow control buffer quota.static final long
A 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 long
A constant specifies the default value of maximum number of message redelivery attempts.static final long
A 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 long
A constant specifying the default value of base message retransmission interval.static final boolean
A constant specifying the default value for disabling the generation of theOffer
element as part of theCreateSequence
message.static final boolean
A constant specifying the default value for enabling "reject out-of-order messages".static final long
A constant specifying the default value of sequence inactivity timeout.static final long
Default period (in milliseconds) of a sequence manager maintenance task execution.static final boolean
A constant specifying the default value for turning off state update when received AckRequested is processed at RMD.static final boolean
A constant specifying the default value for enabling XA TX at server side RMD.static final int
A constant specifying the default value for XA TX timeout that is used at server side RMD (in seconds).static final String
Fields 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 TypeMethodDescriptionboolean
canRetransmitMessage
(long nextRetransmissionCount) Returnstrue
if the next attempt to retransmit a message indicated bynextRetransmissionCount
input parameter is allowed as per current feature configuration.long
Specifies the duration after which the RM Destination will transmit an acknowledgement.long
Specifies interval between sending subsequent acknowledgement request messages by an RM Source in case of any unacknowledged messages on the sequence.long
Specifies the timeout for aCloseSequenceRequest
message.Specifies the message delivery quality of service between the RM and application layer.long
This attribute may be used together with ordered delivery requirement.getID()
long
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.long
A message is considered to be transferred if its delivery at the recipient has been acknowledged by the recipient.long
The infrastructure tries to send each RM session protocol control message such as CreateSequence, CloseSequence, TerminateSequence at most a#getMaxRmSessionControlMessageResendAttempts()
number of times.long
Specifies 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.long
Specifies a period of inactivity for a Sequence in ms.long
Specifies the period (in milliseconds) of a sequence manager maintenance task execution.boolean
Specifies whether the generation of theOffer
element as part of theCreateSequence
message is forced-disabled or not.boolean
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.boolean
Specifies whether the runtime should use persistent message storage or not.boolean
Specifies 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 theOffer
element as part of theCreateSequence
message.- 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:
getID
in 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
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_TIMEOUT
constant.
-
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
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.DeliveryAssurance
values, and the requirements of those values will also be met. In particular if theReliableMessagingFeature.DeliveryAssurance.AT_LEAST_ONCE
orReliableMessagingFeature.DeliveryAssurance.EXACTLY_ONCE
value 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:
true
if the ordered delivery si required,false
otherwise. If not set explicitly, the default value isfalse
.
-
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_QUOTA
constant.
-
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_INTERVAL
constant.
-
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
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) Returnstrue
if the next attempt to retransmit a message indicated bynextRetransmissionCount
input 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:
true
if it is possible to retransmit a message,false
otherwise.- See Also:
-
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
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_INTERVAL
constant.
-
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_INTERVAL
constant.
-
getCloseSequenceOperationTimeout
Specifies the timeout for aCloseSequenceRequest
message. 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_TIMEOUT
constant.
-
isPersistenceEnabled
Specifies whether the runtime should use persistent message storage or not.- Returns:
true
if the runtime should use persistent message storage,false
otherwise
-
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
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 theOffer
element as part of theCreateSequence
message is forced-disabled or not.- Returns:
true
if the generation of theOffer
element as part of theCreateSequence
message is forced-disabled,false
otherwise.
-
isRejectOutOfOrderMessagesEnabled
public boolean isRejectOutOfOrderMessagesEnabled()Specifies whether RMD should reject out-of-order messages that it receives.- Returns:
true
if RMD should reject out-of-order messages. Default is false.
-
toString
-