<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,9 +6,9 @@
 # Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
-# 
+#
 #     http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,14 +25,14 @@ require 'chef/log'
 
 
 class Chef::Application::Indexer &lt; Chef::Application
-  
-  option :config_file, 
+
+  option :config_file,
     :short =&gt; &quot;-c CONFIG&quot;,
     :long  =&gt; &quot;--config CONFIG&quot;,
     :default =&gt; &quot;/etc/chef/server.rb&quot;,
     :description =&gt; &quot;The configuration file to use&quot;
 
-  option :log_level, 
+  option :log_level,
     :short        =&gt; &quot;-l LEVEL&quot;,
     :long         =&gt; &quot;--log_level LEVEL&quot;,
     :description  =&gt; &quot;Set the log level (debug, info, warn, error, fatal)&quot;,
@@ -52,7 +52,7 @@ class Chef::Application::Indexer &lt; Chef::Application
     :boolean      =&gt; true,
     :show_options =&gt; true,
     :exit         =&gt; 0
-    
+
   option :user,
     :short =&gt; &quot;-u USER&quot;,
     :long =&gt; &quot;--user USER&quot;,
@@ -76,7 +76,7 @@ class Chef::Application::Indexer &lt; Chef::Application
 
     @chef_search_indexer = nil
   end
-  
+
   # Create a new search indexer and connect to the stomp queues
   def setup_application
     Chef::Daemon.change_privilege
@@ -86,7 +86,7 @@ class Chef::Application::Indexer &lt; Chef::Application
     Chef::Queue.subscribe(:queue, &quot;index&quot;)
     Chef::Queue.subscribe(:queue, &quot;remove&quot;)
   end
-  
+
   # Run the indexer, optionally daemonizing.
   def run_application
     if Chef::Config[:daemonize]
@@ -96,13 +96,13 @@ class Chef::Application::Indexer &lt; Chef::Application
     loop do
       object, headers = Chef::Queue.receive_msg
       Chef::Log.info(&quot;Headers #{headers.inspect}&quot;)
-      if headers[&quot;destination&quot;] == &quot;/queue/chef/index&quot;
+      if headers[&quot;destination&quot;] == &quot;/queue/chef/index&quot; || headers[&quot;destination&quot;] == &quot;/queue/#{queue_prefix}/chef/index&quot;
         start_timer = Time.new
         @chef_search_indexer.add(object)
         @chef_search_indexer.commit
         final_timer = Time.new
         Chef::Log.info(&quot;Indexed object from #{headers['destination']} in #{final_timer - start_timer} seconds&quot;)
-      elsif headers[&quot;destination&quot;] == &quot;/queue/chef/remove&quot;
+      elsif headers[&quot;destination&quot;] == &quot;/queue/chef/remove&quot; || headers[&quot;destination&quot;] == &quot;/queue/#{queue_prefix}/chef/remove&quot;
         start_timer = Time.new
         @chef_search_indexer.delete(object)
         @chef_search_indexer.commit</diff>
      <filename>chef/lib/chef/application/indexer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@ require 'mixlib/config'
 
 class Chef
   class Config
- 
+
     extend Mixlib::Config
 
     # Manages the chef secret session key
@@ -40,7 +40,7 @@ class Chef
       end
       newkey
     end
-  
+
     # Override the config dispatch to set the value of log_location configuration option
     #
     # === Parameters
@@ -49,7 +49,7 @@ class Chef
     def self.log_location=(location)
       configure { |c| c[:log_location] = (location.respond_to?(:sync=) ? location : File.new(location, &quot;w+&quot;)) }
     end
-    
+
     # Override the config dispatch to set the value of authorized_openid_providers when openid_providers (deprecated) is used
     #
     # === Parameters
@@ -58,7 +58,7 @@ class Chef
     def self.openid_providers=(providers)
       configure { |c| c[:authorized_openid_provders] = providers }
     end
-    
+
     authorized_openid_identifiers nil
     authorized_openid_providers nil
     cookbook_path [ &quot;/var/chef/site-cookbooks&quot;, &quot;/var/chef/cookbooks&quot; ]
@@ -73,7 +73,7 @@ class Chef
     group nil
     http_retry_count 5
     http_retry_delay 5
-    interval nil 
+    interval nil
     json_attribs nil
     log_level :info
     log_location STDOUT
@@ -92,6 +92,7 @@ class Chef
     queue_retry_count 5
     queue_retry_delay 5
     queue_user &quot;&quot;
+    queue_prefix nil
     registration_url &quot;http://localhost:4000&quot;
     remotefile_url &quot;http://localhost:4000&quot;
     rest_timeout 60</diff>
      <filename>chef/lib/chef/config.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,9 +6,9 @@
 # Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
-# 
+#
 #     http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,17 +22,17 @@ require 'stomp'
 
 class Chef
   class Queue
-    
+
     @client = nil
     @queue_retry_delay = Chef::Config[:queue_retry_delay]
     @queue_retry_count = Chef::Config[:queue_retry_count]
-    
+
     class &lt;&lt; self
       include Chef::Mixin::ParamsValidate
-      
+
       def connect
         queue_user     = Chef::Config[:queue_user]
-        queue_password = Chef::Config[:queue_password] 
+        queue_password = Chef::Config[:queue_password]
         queue_host = Chef::Config[:queue_host]
         queue_port = Chef::Config[:queue_port]
         queue_retries = 1 unless queue_retries
@@ -69,7 +69,13 @@ class Chef
             }
           }
         )
-        queue_url = &quot;/#{type}/chef/#{name}&quot;
+        if Chef::Config[:queue_prefix]
+	        queue_prefix = Chef::Config[:queue_prefix]
+          queue_url = &quot;/#{type}/#{queue_prefix}/chef/#{name}&quot;
+	      else
+	        queue_url = &quot;/#{type}/chef/#{name}&quot;
+	      end
+	      queue_url
       end
 
       def subscribe(type, name)
@@ -119,7 +125,7 @@ class Chef
         msg = JSON.parse(raw_msg.body)
         return msg, raw_msg.headers
       end
-    
+
       def poll_msg
         connect if @client == nil
         raw_msg = @client.poll()</diff>
      <filename>chef/lib/chef/queue.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>822057fd25a03f252cd761324379340d082e9d58</id>
    </parent>
  </parents>
  <author>
    <name>zeusfaber</name>
    <email>joe@joetify.com</email>
  </author>
  <url>http://github.com/joewilliams/chef/commit/a51bb6abc385d3333ade0926756b3d9c50bcb71b</url>
  <id>a51bb6abc385d3333ade0926756b3d9c50bcb71b</id>
  <committed-date>2009-06-26T10:39:22-07:00</committed-date>
  <authored-date>2009-06-26T10:39:22-07:00</authored-date>
  <message>added code for multiple queues</message>
  <tree>08baed6164bd2feaef5c7a52d877c71f9d0b913f</tree>
  <committer>
    <name>zeusfaber</name>
    <email>joe@joetify.com</email>
  </committer>
</commit>
