logstash-plugins / logstash-input-redis

Apache License 2.0
31 stars 69 forks source link

commands_map broken after switch to redis ~4 #80

Closed kzemek closed 3 years ago

kzemek commented 4 years ago

redis-rb 4 introduced a breaking change in version 4.0 where redis.client became a CLIENT command to Redis server. This breaks commands_map that sets values on redis.client.command_map, but probably also the whole subscribe_stop function.

An easy fix is to just replace redis.client with redis._client, as I've done here: https://github.com/path-network/logstash-input-redis/commit/fb7e374e1a2e0ed2310fe76e9ae6a3daf6c1dbc3

According to the redis-rb changelog for 4.0.1 the proper way to replace client usage is to use a new redis.connection function instead.

kares commented 3 years ago

Thanks for the report, we pushed 3.6.1 please let us know if you run into any issues. In the fix we tried to avoid using the 'internal' _client unless necessary: https://github.com/logstash-plugins/logstash-input-redis/pull/86 ... but otherwise it started based on your suggestions.