skroutz / rafka

Kafka proxy with a simple API, speaking the Redis protocol
https://engineering.skroutz.gr/blog/kafka-rails-integration/
GNU General Public License v3.0
8 stars 0 forks source link

server: Add support for KEYS cmd to list topics #66

Closed papanikge closed 6 years ago

papanikge commented 6 years ago

This commit adds a new cmd in the likes of the redis KEYS command. It is used to list all the topics of the cluster in their fully qualified names.

Note: Normal redis KEYS command takes one argument which matches it as a glob against all keyspace. We do indeed accept an argument for the sake of compatibility but we ignore it.

Usage example:

localhost:6380> keys topics:
1) "topics:greetings"
2) "topics:__consumer_offsets"
3) "topics:another-topic"
papanikge commented 6 years ago

@agis comments addressed.. :)

agis commented 6 years ago

@papanikge Can you please rebase on top of master?

papanikge commented 6 years ago

@agis rebased and squashed. sorry for the delay..

dtheodor commented 6 years ago

The test failure seems legit

papanikge commented 6 years ago

oh yes, that' mine I forgot to change the test to account for the new prefix, sorry about that. On it.