public function setOption($name, $value)
    {
        if (!is_string($name)) {
            throw new Exception('invalid options name');
        }
        $name = strtolower($name);
        if ($name == 'result_store') {
            $this->options['result_store'] = $value;
            $this->setResultStore($value);
        } elseif ($name == 'broker') {
            $this->options['broker'] = $value;
            $this->setBroker($value);
        }
        return $this;
    }