Package kafka.message

Examples of kafka.message.MessageAndOffset.offset()


            buf.get(bytes, buf.position(), origSize);
            value.set(bytes, 0, origSize);
           
            key.set(_index, _offset, msgAndOffset.message().checksum());
           
            _offset += msgAndOffset.offset()//increase offset
            _count ++;  //increase count
           
            return true;
        }
        else return false;
View Full Code Here


                return EmitState.EMIT_END;
            }
            Iterable<List<Object>> tups = generateTuples(toEmitMsg.message());
            if (tups != null) {
                for (List<Object> tuple : tups) {
                    collector.emit(tuple, new KafkaMessageId(partition, toEmitMsg.offset()));
                }
                // break;
            } else {
                ack(toEmitMsg.offset());
            }
View Full Code Here

                for (List<Object> tuple : tups) {
                    collector.emit(tuple, new KafkaMessageId(partition, toEmitMsg.offset()));
                }
                // break;
            } else {
                ack(toEmitMsg.offset());
            }
        }

        // if(!emittingMessages.isEmpty()) {
        // return EmitState.EMIT_MORE;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.