tangentlabs / SolrMQ

Plugin for SOLR that reads from a AMQP queue. Uses RabbitMQ as the client library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SolrMQ

SolrMQ is a plugin for Solr that allows you to send updates to Solr using a AMQP messaging queue. We use the RabbitMQ library.

It makes use of the current Solr update plugins and allows you to specify the Queue name and Update handler.

You will need to add a new request handler (in your solrconfig) similar to the following.

Sample SolrConfig config::

<requestHandler name="/mq" class="org.apache.solr.handler.ext.SolrMessageQueue" >
   <str name="messageQueueHost">localhost</str>
   <str name="queue">solrmq</str>
   <str name="updateHandlerName">/update</str>
   <lst name="workerSettings">
      <!-- <str name="virtualHost">bob</str> -->
      <lst name="authentication">
          <str name="username">user</str>
          <str name="password">password</str>
      </lst>
      <!--
       <lst name="exchange">
          <str name="name">search_index</str>
          <str name="type">fanout</str>
      </lst>
      -->
   </lst>
   <lst name="errorQueue">
      <str name="messageQueueHost">localhost</str>
      <str name="queue">solrmq-errors</str>
       <!-- <str name="virtualHost">bob</str> -->
      <lst name="authentication">
          <str name="username">user</str>
          <str name="password">password</str>
      </lst>
   </lst>
</requestHandler>

You will need to put the ./bin/plugin-solr-mq.jar and the ./lib/rabbitmq-client.jar into the solr lib directory, or load it via the solrconfig.xml.

Note: the plugin should not be loaded lazily, and neither should the update handler.

At the moment it is a fire-and-forget standard queue. We will add in other queue mechanisms shortly, and add in error handeling, such as logging, and error queues.

About

Plugin for SOLR that reads from a AMQP queue. Uses RabbitMQ as the client library.


Languages

Language:Java 100.0%