Skip to content

elastacloud/servicebusspout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elastacloud ServiceBusSpout

The Service Bus Spout uses the Windows Azure Service Bus as a source for input into a Storm topology.

You can create a sample service bus queue processor with code similar to this:

IServiceBusQueueDetail connection = new ServiceBusQueueConnection("Endpoint=sb://***.servicebus.windows.net/;SharedSecretIssuer=owner;SharedSecretValue=***", "myqueue");

TopologyBuilder builder = new TopologyBuilder();

builder.setSpout("sb-queue-reader",new ServiceBusQueueSpout(connection));
builder.setBolt("bolt-reader", new AnyBolt())
    .shuffleGrouping("sb-queue-reader");

Configuration configuration = new Configuration();
LocalCluster cluster = new LocalCluster();
cluster.submitTopology("toplogy", conf, builder.createTopology());
Thread.sleep(1000);
cluster.shutdown();