jhnstn / storm-amqp-clojure

amqp spout with clojure topology

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Demo Topology

This is just a simple topology demo not unlike any found in the storm-starter repo. I would recommend starting there. But this topology does demo the amqp-spout and has a heavily annotated clojure topology.

##Install

  1. Make sure local jars are avaialable in ./lib/ . Currently two jars are required

    1. storm-amqp-spout-0.1.4.jar
    2. storm-json-0.0.1.jar
  2. Install local jars. From the lib directory run both commands below

    # amqp spout
     mvn deploy:deploy-file    		       \
    -Dfile=./lib/storm-amqp-spout-0.1.4.jar \
    -DartifactId=storm-amqp-spout           \
    -Dversion=0.1.4                   	    \
    -DgroupId=com.rapportive          	    \
    -Dpackaging=jar                   	    \
    -Durl=file:mvn_repo/
    
    #json schema
    mvn deploy:deploy-file      		   \
    -Dfile=./lib/storm-json-0.0.1.jar 	\
    -DartifactId=storm-json     		   \
    -Dversion=0.0.1             		   \
    -DgroupId=com.rapportive    		   \
    -Dpackaging=jar             		   \
    -Durl=file:mvn_repo/
    
    
    
  3. Load up depedencies and compile

    lein deps 
    lein compile
    
  4. Run the demo:

    Clojure

    lein run -m com.promojam.clj.basic_stream.clj
    

    Java

    java -cp $(lein classpath) com.promojam.BasicStream
    

    both accept optional arguements : exchange , routing_key ( defaults to 'logstash' , '#' )

    e.g.

    lein run -m com.promojam.clj.basic_stream.clj logstash #
    

About

amqp spout with clojure topology


Languages

Language:Clojure 69.5%Language:Java 30.5%