Skip to content

Commit

Permalink
feat(proxy): PUBSUB command should send to first write resource (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
caojiajun committed Aug 7, 2024
1 parent 2bb5d4e commit e5ee2dc
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ public List<CompletableFuture<Reply>> sendCommand(int db, List<Command> commands
futureList.add(future);
continue;
}
if (redisCommand == RedisCommand.PUBSUB) {
//send to first write resource
List<Resource> writeResources = resourceSelector.getWriteResources(Utils.EMPTY_ARRAY);
CompletableFuture<Reply> future = doWrite(Collections.singletonList(writeResources.get(0)), commandFlusher, command);
futureList.add(future);
continue;
}
//other commands
}

Expand Down

0 comments on commit e5ee2dc

Please sign in to comment.