I recently filed https://issues.apache.org/jira/browse/KAFKA-4481, which Guozhang agreed was a bug. However fixing this will require some minor changes to the existing Kafka Streams APIs.
I've outlined the required changes and binary / source compatibility implications in the KIP https://cwiki.apache.org/confluence/display/KAFKA/KIP-100+-+Relax+Type+constraints+in+Kafka+Streams+API Thank you, Xavier