storm-jms icon indicating copy to clipboard operation
storm-jms copied to clipboard

Incorrect handling of topology.message.timeout.secs

Open DevInsanity opened this issue 9 years ago • 1 comments

Attempting to set the topology.message.timeout.secs config value results in a class cast exception:

java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
    at backtype.storm.contrib.jms.spout.JmsSpout.open(JmsSpout.java:160) ~[stormjar.jar:?]

(Note: this stack trace was produced from the 0.9.0 release, but it looks like the current code has the same issue.)

It looks like the typical method in other parts of Storm is to null-check the value, then cast to Number and call intValue on the result.

See also: https://groups.google.com/forum/#!topic/storm-user/SX2gEBfNEFg

DevInsanity avatar Sep 29 '15 12:09 DevInsanity

After raising this, I was considering fixing it myself, but noticed that https://github.com/ptgoetz/storm-jms/pull/9 exists, which looks like it's an out-of date fix for this very issue.

DevInsanity avatar Sep 29 '15 13:09 DevInsanity