Logstash with redis server

Hi, can I use input from redis server on logstash 5.2, where received input passed to redis server from logstash 2.4?

logstash2.4 --> redis output--> redis-server --> logstash5.2 input?

Yes. The event structure is the same.

Thanks for your reply, is it okay if I read from redis server with version logstash5.2 with a config below?
input{ redis { host => "redis.host" port => redis.port key => "logstash_searchlog" data_type => "list" codec => "json" type => "redis_input" } }

Sure, if you sent to the same key, then that should work to pull it back out.