Source:
<code>private void createKafkaConsumer(String name, final MessageChannel moduleInputChannel, Properties properties, ConsumerConnector connector) { if (name.startsWith(P2P_NAMED_CHANNEL_TYPE_PREFIX)) { validateConsumerProperties(name, properties, SUPPORTED_NAMED_CONSUMER_PROPERTIES); } else { validateConsumerProperties(name, properties, SUPPORTED_CONSUMER_PROPERTIES); } KafkaPropertiesAccessor accessor = new KafkaPropertiesAccessor(properties); Map<String, Integer> topicCountMap = new HashMap<String, Integer>(); int numThreads = 1; String topic = escapeTopicName(name); topicCountMap.put(topic, numThreads); Decoder<byte[]> valueDecoder = new DefaultDecoder(null); Decoder<Integer> keyDecoder = new IntegerEncoderDecoder(); Map<String, List<KafkaStream<Integer, byte[]>>> consumerMap = connector.createMessageStreams( topicCountMap, keyDecoder, valueDecoder); final KafkaStream<Integer, byte[]> stream = consumerMap.get(topic).iterator().next(); final DirectChannel bridge = new DirectChannel(); ReceivingHandler rh = new ReceivingHandler(connector); rh.setOutputChannel(moduleInputChannel); EventDrivenConsumer edc = new EventDrivenConsumer(bridge, rh); edc.setBeanName("inbound." + name); Binding consumerBinding = Binding.forConsumer(name, edc, moduleInputChannel, accessor); addBinding(consumerBinding); consumerBinding.start(); executor.submit(new Runnable() { @Override public void run() { <START> System.out.println(Thread.currentThread()); <END> ConsumerIterator<Integer, byte[]> it = stream.iterator(); while (it.hasNext()) { byte[] msg = it.next().message(); bridge.send(MessageBuilder.withPayload(msg).build()); } } }); }</code><technical_language>I assume this meant removed</technical_language>

Target:
private void createKafkaConsumer(String name, final MessageChannel moduleInputChannel, Properties properties, ConsumerConnector connector) { if (name.startsWith(P2P_NAMED_CHANNEL_TYPE_PREFIX)) { validateConsumerProperties(name, properties, SUPPORTED_NAMED_CONSUMER_PROPERTIES); } else { validateConsumerProperties(name, properties, SUPPORTED_CONSUMER_PROPERTIES); } KafkaPropertiesAccessor accessor = new KafkaPropertiesAccessor(properties); Map<String, Integer> topicCountMap = new HashMap<String, Integer>(); int numThreads = 1; String topic = escapeTopicName(name); topicCountMap.put(topic, numThreads); Decoder<byte[]> valueDecoder = new DefaultDecoder(null); Decoder<Integer> keyDecoder = new IntegerEncoderDecoder(); Map<String, List<KafkaStream<Integer, byte[]>>> consumerMap = connector.createMessageStreams( topicCountMap, keyDecoder, valueDecoder); final KafkaStream<Integer, byte[]> stream = consumerMap.get(topic).iterator().next(); final DirectChannel bridge = new DirectChannel(); ReceivingHandler rh = new ReceivingHandler(connector); rh.setOutputChannel(moduleInputChannel); EventDrivenConsumer edc = new EventDrivenConsumer(bridge, rh); edc.setBeanName("inbound." + name); Binding consumerBinding = Binding.forConsumer(name, edc, moduleInputChannel, accessor); addBinding(consumerBinding); consumerBinding.start(); executor.submit(new Runnable() { @Override public void run() { ConsumerIterator<Integer, byte[]> it = stream.iterator(); while (it.hasNext()) { byte[] msg = it.next().message(); bridge.send(MessageBuilder.withPayload(msg).build()); } } }); }