A method for recovering and requeueing lost messages is disclosed. The
lost messages are intended for delivery from a first computer program to
a second computer program but are instead stranded in locations internal
to the first program. The method extracts one or more of these stranded
messages from the location internal to the first program, determines the
original destination of each stranded message and delivers that message
to the second program. Delivery of each message to the second program is
facilitated by using message queues provided by middleware type software
programs. The desired middleware program can be selected by the user of
the method, and the method provides for the necessary formatting of each
recovered message according to the selected middleware. Absent use of the
present method, these stranded messages would not be routed to their
original destinations.