Database Reference
In-Depth Information
Wiring the topology for the AMQP spout
Now we have the clustered queue setup ready, the AMQP spout in place, and the feeder
component in place; let's put the last and final piece in place, that's the overall integration
of the Storm topology.
Let's use our WordCount topology again and instead of RandomSentenceSpout we
will use AMQPRecvSpout , which we designed in the previous section, Integrating Storm
with RabbitMQ .
The following code chunk needs to be modified:
builder.setSpout("spout", new RandomSentenceSpout(), 5);
builder.setBolt("split", new SplitSentence(),
8).shuffleGrouping("spout");
We will use the new spout instead, as follows:
builder.setSpout("queue_reader", new
AMQPRecvSpout(Constants.RMQ_ADDRESS, 5672, "guest",
"guest", "/"));
Search WWH ::




Custom Search