Adapter Development Kit 6.5 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Polling Notifications | The runNotification Method | The Exactly Once Notification Feature
 
The Exactly Once Notification Feature
The Exactly Once notification feature ensures that duplicate polling notifications will not be processed, even if a failure occurs during processing.
To use the Exactly Once feature, use the following form of the doNotify method in the notification, and provide a resource-specific msgID value with each notification record:
public void doNotify(WmRecord rec, java.lang.String msgID)
The adapter implementation must guarantee that the value of msgID is unique and constant for each notification event. (A notification event is defined as any activity on the adapter resource that will cause your runNotification implementation to call doNotify.) This means that the msgID will never be duplicated for different notification events, but the msgID will be the same if the same notification event is retrieved multiple times from the adapter resource (even in a failure-recovery scenario).
The server guarantees that msgID values generated by different notification nodes are unique. It accomplishes this by combining the adapter-provided msgID value with a GUID that is created by the server and associated with the notification node when it is created.
Note:
The length (the number of characters) of the value in msgId should not exceed a particular limit. To determine this limit, call the WmAsynchronousNotification.adapterMaxMessageIdLen() method. There is a fixed number of characters available in Integration Server to hold a notification ID. Of these, the WmART package reserves a certain number to hold a unique ID that it inserts prior to dispatching a notification. The remaining characters are available to you when calling WmAsynchronousNotification.doNotify(WmRecord rec, String msgId). For more information, see the Javadoc for WmAsynchronousNotifcation.doNotify.
If you do not want to use the Exactly Once feature, use the following form of doNotify:
public void doNotify(WmRecord rec)
For more information, see the Javadoc for WmAsynchronousNotification.