Github user itaifrenkel commented on a diff in the pull request:
https://github.com/apache/incubator-storm/pull/177#discussion_r17314627
--- Diff: examples/storm-starter/multilang/resources/asyncSplitsentence.js
---
@@ -0,0 +1,32 @@
+/**
+ * Example for async bolt. Receives sentence and breaks it into words.
+ *
+ */
+
+
+var storm = require('./storm');
+var BasicBolt = storm.BasicBolt;
+
+function SplitSentenceBolt() {
+ BasicBolt.call(this);
+};
+
+SplitSentenceBolt.prototype = Object.create(BasicBolt.prototype);
+SplitSentenceBolt.prototype.constructor = SplitSentenceBolt;
+
+SplitSentenceBolt.prototype.process = function(tup, done) {
+ var self = this;
+
+ // Here setTimeout is not really needed, we use it to demonstrate
asynchronous code in the process method:
+ setTimeout(function() {
+ var words = tup.values[0].split(" ");
+ words.forEach(function(word) {
+ self.emit({tuple: [word], anchorTupleId: tup.id},
function(taskIds) {
--- End diff --
WordCountTopologyNode.WordCount Bolt extends BaseBasicBolt which is then
wrapped by BasicBoltExecutor which AFAIK acks
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---