Storm integrates with RabbitMQ using an AMQPSpout, which reads the messages from RabbitMQ and pushes them to Storm topology for further processing. The following code snippet captures the key aspects of encoding the AMQPSpout:
.. public class AMQPSpout implements IRichSpout { private static final long serialVersionUID = 1L; /** * Logger instance */ private static final Logger log = LoggerFactory.getLogger(AMQPSpout.class); private static final long CONFIG_PREFETCH_COUNT = 0; private static final long DEFAULT_PREFETCH_COUNT = 0; private static final long WAIT_AFTER_SHUTDOWN_SIGNAL = 0; private static final long WAIT_FOR_NEXT_MESSAGE = 1L; private static final String EXCHANGE_NAME = "MYExchange"; private static final String QUEUE_NAME ...