Class ReliableMessagingFeature

java.lang.Object
jakarta.xml.ws.WebServiceFeature
com.sun.xml.ws.rx.rm.api.ReliableMessagingFeature
All Implemented Interfaces:
StickyFeature

@ManagedData public class ReliableMessagingFeature extends jakarta.xml.ws.WebServiceFeature implements StickyFeature
Reliable messaging feature is an implementation of 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.

  • Field Details

    • ID

      public static final String ID
      See Also:
    • DEFAULT_SEQUENCE_INACTIVITY_TIMEOUT

      public static final long DEFAULT_SEQUENCE_INACTIVITY_TIMEOUT
      A 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_QUOTA
      A 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_INTERVAL
      A 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_COUNT
      A 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_ATTEMPTS
      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.
      See Also:
    • DEFAULT_ACKNOWLEDGEMENT_TRANSMISSION_INTERVAL

      public static final long DEFAULT_ACKNOWLEDGEMENT_TRANSMISSION_INTERVAL
      Specifies 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_INTERVAL
      A 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_TIMEOUT
      A 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_PERIOD
      Default period (in milliseconds) of a sequence manager maintenance task execution.
      See Also:
    • DEFAULT_MAX_CONCURRENT_SESSIONS

      public static final long DEFAULT_MAX_CONCURRENT_SESSIONS
      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. Currently, the default value is set to infinity (-1).
      See Also:
    • DEFAULT_OFFER_ELEMENT_GENERATION_DISABLED

      public static final boolean DEFAULT_OFFER_ELEMENT_GENERATION_DISABLED
      A constant specifying the default value for disabling the generation of the Offer element as part of the CreateSequence message.
      See Also:
    • DEFAULT_REJECT_OUT_OF_ORDER_MESSAGES

      public static final boolean DEFAULT_REJECT_OUT_OF_ORDER_MESSAGES
      A 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_DISABLED
      A 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_RMD
      A 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_SECONDS
      A 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

      @ManagedAttribute public String getID()
      Specified by:
      getID in class jakarta.xml.ws.WebServiceFeature
    • getProtocolVersion

      @ManagedAttribute public RmProtocolVersion 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_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

      @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.DeliveryAssurance values, and the requirements of those values will also be met. In particular if the ReliableMessagingFeature.DeliveryAssurance.AT_LEAST_ONCE or ReliableMessagingFeature.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 is false.
    • 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_QUOTA constant.
    • 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_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

      @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 the isMessageRetransmissionLimited() returns true, the infrastructure tries to send the message for at most a getMaxMessageRetransmissionCount() 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 via getRetransmissionBackoffAlgorithm() to determine when to retransmit, based on the configured base retransmission time retrieved via a call to getMessageRetransmissionInterval().
      Returns:
      maximum number of message transmission retries
    • canRetransmitMessage

      public boolean canRetransmitMessage(long nextRetransmissionCount)
      Returns true if the next attempt to retransmit a message indicated by nextRetransmissionCount 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

      @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_INTERVAL constant.
    • 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_INTERVAL constant.
    • getCloseSequenceOperationTimeout

      @ManagedAttribute public long getCloseSequenceOperationTimeout()
      Specifies the timeout for a CloseSequenceRequest 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

      @ManagedAttribute public boolean 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

      @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 the Offer element as part of the CreateSequence message is forced-disabled or not.
      Returns:
      true if the generation of the Offer element as part of the CreateSequence 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

      public String toString()
      Overrides:
      toString in class Object