I have to publish "testing" channel and listen into "mytesting()" but publish is successfully done. but on subscribe mytesting() not executed.
public function test()
{
$this->redis_connection();
$this->redis->publish('testing',"hi");
try
{
$success=$this->redis->subscribe('testing','mytesting');
print_r($success);
}catch(Exception $e)
{
print_r($e->getMessage());
}
}
public function mytesting($reds, $chan, $stdout)
{
return $chan;
}
Try to use this library for subscribe in redis
CodeIgniter Redis : https://github.com/joelcox/codeigniter-redis