Package kafka.serializer

Examples of kafka.serializer.DefaultDecoder


    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();
View Full Code Here


    Map<String, Integer> topicCountMap = new HashMap<String, Integer>();
    int numThreads = 1;
    topicCountMap.put(topic, numThreads);


    Decoder<byte[]> valueDecoder = new DefaultDecoder(null);
    Decoder<Integer> keyDecoder = new IntegerEncoderDecoder();

    KafkaTestMessageBus busWrapper = (KafkaTestMessageBus) getMessageBus();
    // Rewind offset, as tests will have typically already sent the messages we're trying to consume
    ConsumerConnector connector = busWrapper.getCoreMessageBus().createConsumerConnector(
View Full Code Here

     * @param processor the {@link StreamProcessor} to process the stream with.
     * @return a {@link KafkaConsumerBuilder} to build a {@link KafkaConsumer} for the given
     *         processor.
     */
    public KafkaConsumerBuilder<Message> processWith(final StreamProcessor<Message> processor) {
        return processWith(new DefaultDecoder(), processor);
    }
View Full Code Here

     * @param processor the {@link StreamProcessor} to process the stream with
     * @return          a {@link KafkaConsumerBuilder} to build a
     *                  {@link KafkaConsumer} for the given processor
     */
    public KafkaConsumerBuilder<Message> processWith(final StreamProcessor<Message> processor) {
        return processWith(new DefaultDecoder(), processor);
    }
View Full Code Here

TOP

Related Classes of kafka.serializer.DefaultDecoder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.