Apache Storm - Accessing database from SPOUT - connection pooling
问题 Having a spout which on each tick goes to Postgre database and reads an additional row. The spout code looks as follows: class RawDataLevelSpout extends BaseRichSpout implements Serializable { private int counter; SpoutOutputCollector collector; @Override public void declareOutputFields(OutputFieldsDeclarer declarer) { declarer.declare(new Fields("col1", "col2")); } @Override public void open(Map map, TopologyContext context, SpoutOutputCollector spoutOutputCollector) { collector =