John,
You can get a copy of a useful technical note called “Optimizing Publish / Subscribe Solutions” from Advantage at this link: [url=“http://advantage.webmethods.com/bookshelf/Best_Practices/DetailedProdTechInfo/TechNotes/TNote_PubSubOptomization.pdf”]http://advantage.webmethods.com/bookshelf/Best_Practices/DetailedProdTechInfo/TechNotes/TNote_PubSubOptomization.pdf[/url]
This document states that “The Integration Server continuously monitors its connection to the Broker and alters its publishing behavior if it senses that the Broker is not connected.”
It goes on to say “If a publishing service publishes a guaranteed document while the Broker is unavailable, the dispatcher routes the document to the outbound store (volatile documents are discarded). When the connection is re-established, the Integration Server automatically sends documents (in batches) from the outbound store to the Broker”
Note that volatile documents are not routed to outbound storage and that the outbound store (disk-based) is not used when the broker connection exists.
I think the correct solution somewhat depends on how your external application (client) is sending requests to the IS. If it is using a fire-and-forget approach whereby it assumes that IS will never lose any requests it sends then it must also deal with the situation that arises when IS goes down at the instant the request is sent. A better approach is for a client to wait for a functional acknowledgement of some sort to be returned by IS and then and only then to assume that the request has been safely received.
In your situation above, this functional ack would only be returned after the broker had acknowledged receipt of the guaranteed document (or the doc had been written to the outbound store).
I think the issue on the table now is one in which you assume that the broker is unavailable, the guaranteed document is written to the outbound store but the IS fails before a functional ack could be successfully delivered to the external client.
In this scenario, it is possible for the external client to resend a request which could lead to a duplicate document being sent to the broker. I think there are numerous approaches to dealing with this unlikely event including implementing some form of duplicate checking for the inbound client request based on a transaction ID or message ID.
To arrive at the correct solution you should consider both the risk (or cost) of processing a duplicate message as well as the effort required to create an adequate duplicate detection capability for inbound requests. You should also carefully consider the negative performance impacts of any solution that includes the client-side queuing and duplicate document detection features of IS.
Mark
#webMethods-General#webMethods-Architecture#webMethods#Integration-Server-and-ESB