protected boolean upsertToCollection(IQueueMessage<ID, DATA> msg) {
        getCollection().replaceOne(Filters.eq(COLLECTION_FIELD_ID, msg.getId()), toDocument(msg),
                REPLACE_OPTIONS);
        return true;
    }
protected boolean upsertToCollection ( IQueueMessage < ID , DATA > msg ) { getCollection ( ) . replaceOne ( Filters . eq ( COLLECTION_FIELD_ID , msg . getId ( ) ) , toDocument ( msg ) , REPLACE_OPTIONS ) ; return true ; }
Insert/Update the message to collection.

@param msg
@return