In my testing, the second message was consistently lost. However, if multiple messages were sent between detaching and disconnecting, only the first one was lost. In addition, repeating the message/disconnect/reconnect cycle doesn't lead to additional dropped messages. Tested with sqlite and the in-memory message store.