Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

cp ~/.m2/repository/com/rabbitmq/amqp-client/3.2.1/amqp-client-3.2.1.jar ~/heritrix-3/heritrix/lib/

Using Umbra

To enable umbra in a crawl job you need to do two things

  1. Create the publisher bean and add it to the fetchProcessors bean: 

    Code Block
     <bean id="umbraBean" class="org.archive.modules.AMQPPublishProcessor">
      <property name="clientId" value="requests"/>
     </bean> 
    .
    .
    .
    <ref bean="extractorSwf"/>
    <ref bean="umbraBean"/>
  2. Add the listener (receiver) bean at the top level of the crawler beans file: 

    Code Block
     <bean class="org.archive.crawler.frontier.AMQPUrlReceiver"/>

There is very little in umbra which is actually configurable - so far as i can see only the names of the queues. This might be useful if you are running multiple heritrix instances sharing the same broker.

Things to Think About

  • Don't forget to set the "clientId" property as shown above. It is probably a bug that this isn't set by default to be consistent with the default configuration of the receiver.
  • Heritrix sends every queued http and https url link to umbra except for robots.txt and urls received from umbra.
  • Urls are received from umbra asynchronously and put directly into the frontier. That means they lose they have no discovery path and just get an "I". This also means that they are not subject to heritrix's normal scoping rules (question).
  • Urls received from umbra are marked in the crawl log with the string "receivedFromAMQP" so you can identify them.
  • Because the communication is asynchronous there can still be urls left on the queue after the job has finished. Remember to drain the queue 

    Code Block
    drain-queue

    before running the next harvest.