I assisted in the development of a customized reporting system that accepted information via JMS from external applications. In this case, the two types of information being received were batch-processing requests and updates to meta-data needed to produce reports.
In all cases, the format of the messages received was XML. We had different document formats for the batch-processing requests and the report template meta-data updates. Immediately after receiving a message, we would go through the following steps:
Parse the XML document.
If there was a parse error, log the error and the contents of the message as well as notify an application administrator by e-mail.
If the document was well formed, interrogate the document type.
If the document was one of the two supported types, record it's receipt, including the XML text, the document type, and the date and time of receipt, in a file on disk (using a database or any other storage media).
Process the request normally, mailing any errors, along with the XML text, to an application administrator mail group. The application sending us the XML messages had representatives in the mail group.
An application administrator could resubmit both types of requests via a secured Web page if necessary.