Skip to content

Instantly share code, notes, and snippets.

@mstump
Created April 20, 2012 06:51
Show Gist options
  • Save mstump/2426677 to your computer and use it in GitHub Desktop.
Save mstump/2426677 to your computer and use it in GitHub Desktop.
data leaves spout, but doesn't arrive at bolt
(defbolt build-package-hash-bolt ["package"]
[tuple collector]
(emit-bolt! collector [(build-package-hash (:message tuple))] :anchor tuple)
(ack! collector tuple))
(defbolt json-deser-bolt ["message"]
[tuple collector]
(try
(emit-bolt! collector [(json/parse-string (:message tuple))] :anchor tuple)
(ack! collector tuple)
(catch Exception e (fail! collector tuple))))
(defn mk-redis-topology
[keyspace_name host port timeout password]
(topology
{"node-input" (spout-spec (RedisPubSubSpout. host port queue timeout password))}
{"json-deser" (bolt-spec {"node-input" :shuffle}
json-deser-bolt)
"build-package-hash" (bolt-spec {"json-deser" :shuffle}
build-package-hash-bolt)
"write-package-to-db" (bolt-spec {"build-package-hash" :shuffle}
(pkg/put-bolt keyspace_name))}))
@mstump
Copy link
Author

mstump commented Apr 20, 2012

Storm UI screenshot:
http://i.imgur.com/tB1DF.png

@mstump
Copy link
Author

mstump commented Apr 20, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment