elastic-job

这个上下文JobExecutionMultipleShardingContext 中可以拿到分给自己的分片,如1,3,5

这时你的业务可以这样select * from xxxxtab where id%10 = 1 or  id%10 = 3 or  id%10 = 5,找到数据,进行处理,

分到2,4,6分片的机器,也是这种逻辑,拿自己分片的数据处理


你可能感兴趣的:(elastic-job)