Re: how to force a consumer to start at the beginning

2013-07-25 Thread Rob Withers
Awesome, thanks so much, rob On Jul 25, 2013, at 4:35 PM, Florin Trofin wrote: > You can set the "consumer.timeout.ms" to have a ConsumerTimeoutException > thrown if the broker doesn't respond within that time period: > > var done = False > val consumerIterator = initConsumer() >

Re: how to force a consumer to start at the beginning

2013-07-25 Thread Florin Trofin
You can set the "consumer.timeout.ms" to have a ConsumerTimeoutException thrown if the broker doesn't respond within that time period: var done = False val consumerIterator = initConsumer() while(true) { try { val messageAndMetadata = consumerIterator.next() //

Re: how to force a consumer to start at the beginning

2013-07-25 Thread Rob Withers
Oh boy, is my mind slow today. The tamasic cells woke up but the rajasic ones stayed asleep, which is rather ironic, if you know what I mean. My only hope is the sattvasic few. The issue of threading is secondary to the blocking api. How can I know the traffic is drained from a topic/partit

Re: how to force a consumer to start at the beginning

2013-07-25 Thread Rob Withers
Thanks, Joe, I also see the answer to my other question, that the KafkaStream is not on a different thread, but I automatically expect it to be since all other uses we have had of the KafkaStream are stuffed in a Runnable. duh. thanks, rob On Jul 25, 2013, at 11:41 AM, Joe Stein wrote: > in

Re: how to force a consumer to start at the beginning

2013-07-25 Thread Rob Withers
Thanks, Jim. I saw that in the 0.8 config as well. I am trying to write a REST service that dumps all traffic in a given topic/partition. The issue I seem to be facing now is the blocking API of the consumerIterator. Is there any way we can ask whether the traffic is drained? Perhaps a way

Re: how to force a consumer to start at the beginning

2013-07-25 Thread Joe Stein
in 0.8 you can set the property "auto.offset.reset" = "smallest" when creating your ConsumerConfig ... this will override the default value of "largest" take a look at ConsoleConsumer.scala for more example if need be /*** Joe Stein Founder, Principal C

Re: how to force a consumer to start at the beginning

2013-07-25 Thread James A. Robinson
On Thu, Jul 25, 2013 at 9:11 AM, Withers, Robert wrote: > We are creating a consumer with properties and I did not see a > property that screamed that it was to start at the beginning of a > topic. Is there such a property? In v0.7, set 'autooffset.reset' to 'smallest'. Jim - - - - - - - - - -

how to force a consumer to start at the beginning

2013-07-25 Thread Withers, Robert
We are creating a consumer with properties and I did not see a property that screamed that it was to start at the beginning of a topic. Is there such a property? Thanks, rob [cid:image001.png@01CE891F.54E75000] Rob Withers Staff Analyst/Developer o: (720) 514-8963 c: (571) 262-1873