CoralStore FAQ

Below some frequently asked questions about CoralStore.

  1. When using an asynchronous store, don’t you lose messages in the queue in the event of a crash?
    No. CoralStore will automatically drain the queue using a shutdown hook in the event of a crash. You can also control the queue explicitly if you want to with the methods below, but you don’t have to.

    // this method will block, wait for the store queue to be drained and then return
    asyncStore.drainAndWait();
    
    // drain and close the the store gracefully
    // this method will NOT block, returning immediately, but all messages from the store will
    // be processed before the store is closed
    asyncStore.close(); // returns immediately, but adds a close event in the queue for this store