You can recover data from off-line database logs.
You use the rebuild queues command only after you have restarted the Replication Server in standalone mode. Executing rebuild queues in standalone mode puts Replication Server in recovery mode.
Rep Agent not in recovery mode
If you use a script that automatically restarts RepAgent and connects it to the Replication Server, you must start RepAgent using the for_recovery option. RepAgents are not allowed to connect in normal mode.
This figure illustrates the progression from normal mode to standalone mode to recovery mode using the rebuild queues command.