Message is stored in CSQ. This is an embedded Derby database that resides on IS installation. (install/IntegrationServer/instances//db is default, and configurable)
When connection is restored, these messages are then published to Broker and removed from CSQ.
While these messages are getting published, new requests are handled according to CSQ order setting (“In Order”, Yes/No) setting. If set to yes, then new requests will queued in CSQ to maintain order with messages published earlier, otherwise new requests will get directly published to Broker.
This behaviour should be documented in IS guides.