...
The submission version specified an outdated version of WS-Addressing, using the http://schemas.xmlsoap.org/ws/2004/08/addressing namespace, which has since been replaced by the official http://www.w3.org/2005/08/addressing
namespace. Most other web services implementations supporting the submission version of WS-ReliableMessaging have deviated from the specification by moving to the official WS-Addressing release with the http://www.w3.org/2005/08/addressing namespace. CXF supports the submission version of RM with either WS-Addressing namespace.
...
Key | Value |
---|---|
WSRM_VERSION_PROPERTY | String WS-RM version namespace (http://schemas.xmlsoap.org/ws/2005/02/rm/ ![]() or http://docs.oasis-open.org/ws-rx/wsrm/200702 ![]() ) |
WSRM_WSA_VERSION_PROPERTY | String WS-Addressing version namespace (http://schemas.xmlsoap.org/ws/2004/08/addressing ![]() or http://www.w3.org/2005/08/addressing ![]() ) - this property is ignored unless you're using the http://schemas.xmlsoap.org/ws/2005/02/rm/ ![]() RM namespace) |
WSRM_LAST_MESSAGE_PROPERTY | Boolean value TRUE to tell the RM code that the last message is being sent, allowing the code to close the RM sequence and release resources (as of the 3.0.0 version of CXF the RM code will by default close the RM sequence when you close your client; earlier versions of CXF did not close the sequence unless told to using this flag, or if configured with a source policy <wsrm-mgr:sequenceTerminationPolicy terminateOnShutdown="true"/>) |
WSRM_INACTIVITY_TIMEOUT_PROPERTY | Long inactivity timeout in milliseconds |
WSRM_RETRANSMISSION_INTERVAL_PROPERTY | Long base retransmission interval in milliseconds |
WSRM_EXPONENTIAL_BACKOFF_PROPERTY | Boolean exponential backoff flag |
WSRM_ACKNOWLEDGEMENT_INTERVAL_PROPERTY | Long acknowledgement interval in milliseconds |
You can also monitor and control many aspects of RM using the JMX + Management features of CXF. The full list of JMX operations is defined by org.apache.cxf.ws.rm.ManagedRMManager and org.apache.cxf.ws.rm.ManagedRMEndpoint, but these operations include viewing the current RM state down to the individual message level. You can also use JXM to close and/or terminate an RM sequence, and to receive notification of when previously-sent messages are acknowledged by the remote RM endpoint.
For example, if you have the JMX server enabled in your client configuration you could use this code to track the last acknowledgement number received:
Code Block |
---|
private static class AcknowledgementListener implements NotificationListener { private volatile long lastAcknowledgement; @Override public void handleNotification(Notification notification, Object handback) { if (notification instanceof AcknowledgementNotification) { AcknowledgementNotification ack = (AcknowledgementNotification)notification; lastAcknowledgement = ack.getMessageNumber(); } } } // initialize client ... // attach to JMX bean for notifications // NOTE: you must have sent at least one message to initialize RM before executing this code Endpoint ep = ClientProxy.getClient(client).getEndpoint(); InstrumentationManager im = bus.getExtension(InstrumentationManager.class); MBeanServer mbs = im.getMBeanServer(); RMManager clientManager = bus.getExtension(RMManager.class); ObjectName name = RMUtils.getManagedObjectName(clientManager, ep); System.out.println("Looking for endpoint name " + name); AcknowledgementListener listener = new AcknowledgementListener(); mbs.addNotificationListener(name, listener, null, null); // send messages using RM with acknowledgement status reported to listener ... |