def register_message(message_name, options={})
      name = message_name.to_s
      raise ConfigurationError.new("message #{name} already configured") if messages.include?(name)
      opts = {:exchange => name, :key => name}.merge!(options.symbolize_keys)
      opts.merge! :persistent => true
      exchange = opts[:exchange] = opts[:exchange].to_s
      register_exchange(exchange) unless exchanges.include?(exchange)
      messages[name] = opts
    end
def register_message(message_name, options={})
      name = message_name.to_s
      raise ConfigurationError.new("message #{name} already configured") if messages.include?(name)
      opts = {:exchange => name, :key => name}.merge!(options.symbolize_keys)
      opts.merge! :persistent => true
      exchange = opts[:exchange] = opts[:exchange].to_s
      register_exchange(exchange) unless exchanges.include?(exchange)
      messages[name] = opts
    end
register a persistent message with a given _name_ and an _options_ hash:
 [<tt>:key</tt>]
   specifies the routing key for message publishing (defaults to the name of the message)
 [<tt>:ttl</tt>]
   specifies the time interval after which the message will be silently dropped (seconds).
   defaults to Message::DEFAULT_TTL.
 [<tt>:redundant</tt>]
   specifies whether the message should be published redundantly (defaults to false)