Hello All,

I seems that the "[Discuss] Release Storm 1.2.0" thread reached some limits
as my latest posts on it aren't being received.

Whatever, here's the follow-up of my tests with storm-1.2.0 preview with
latest version of Stig's storm-kafka-client:

It works !

But... to make my topologies compatible with both 1.1.0 and 1.2.0, I had to
write an ugly method based on reflection so as to activate "acks" on the
official Kafka spout when used in autocommit mode:

    /**
     * Toggle the mode that makes Kafka spout able to send acks, if it's
supported.
     * The support for this toggle has been introduced in Storm 1.2.0, so we
     * internal use reflection in order to keep our topologies compatible
with pre-1.2.0
     * @param builder A kafka spout config builder.
     * @return The spout config builder that was passed in argument, with
modified toggle if it's supported.
     */
    public static Builder<?, ?>    fixKafkaSpoutAcking(Builder<?, ?>
builder) {
        try {
            Method m =
builder.getClass().getMethod("setTupleTrackingEnforced", boolean.class);
            m.invoke(builder, true);
        } catch (NoSuchMethodException | SecurityException |
IllegalAccessException | IllegalArgumentException |
InvocationTargetException e) {
            // Assume we're running with storm-kafka-client 1.1.0
        }
        return builder;

Next step for me: now that basic functionnal tests are OK, I want to run
the tests on my PPD environments having real big data rate and compare it
with my PRD one with same volume... stay tuned!

Thanks a lot to Stig for his quite reactive fixes on storm-kafka-client !

Best regards,
Alexandre

Reply via email to