Is there a way to set priorities for channels?

We have channels established in the sync gateway. I was wondering is there any option to set priority to the channels, so that CBLite will automatically pull from the list of channels based on priority.

Thanks in advance :slight_smile:

Not currently. Can you say more about what you’re trying to achieve? You could form your own priority list and do one-shot replications.

@hod.greeley since we have huge number of documents (2 Lakhs generated in last 3 months) we have established channels based on current date. When user logs in, we are pulling the last 3 days channels only and it should be continuous as other users might update the data. The 3 channels data is coming around 10,000 records, it might go up based on the usage of the application but for the user to login immediately we need a specific channel which is “Default” instead of waiting for whole 10,000 records. Instead of we manually setting the channels and starting the replication, I was looking for an option where we set the priority to the channels and CBLite will automatically pull based on the priority instead of random(I guess). Can I know in which order does the pull replication starts, is it based on time stamp ? Can we change the order of replication?

Replication is not based on timestamp. At a high level, pull replication essentially pulls a set of changes from the remote database. To identify what to pull, the replicator maintains a checkpoint which is the sequence Id corresponding to the last change pulled during previous pull replication. So for instance if the sequence ID of last change pulled was 10, during the next pull replication cycle, the client will ask for all changes from sequence ID 10 and so on.
I am not entirely sure I understand your issue - since the replication happens in the background, the app does not have to “wait” for it right? You can get notified of replication progress and handle appropriately .