You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Paul Mackles <pm...@adobe.com> on 2013/08/16 17:29:00 UTC

high-level 0.8 consumer API questions

Hi - I am making a few assumptions about the 0.8 high-level consumer API that I am looking to confirm:

-it is OK to have multiple ConsumerConnector objects in the same process? To be sure, they are all operating independently. I could probably shove everything into one ConsumerConnector if I had to but its easier to manage with separate objects and I have enough memory. Anyone aware of any gotchas with this? I haven't seen any issues with this so far but my testing hasn't been exhaustive (2 or 3 at at time).

-is it OK to call ConsumerConnector.shutdown() whenever I want? In other words, if I find out that a downstream process has failed, can I just call ConsumerConnector.shutdown() at that moment (from another thread) or do I need to wait until the next ConsumerTimeout and call shutdown then? I haven't had a chance to test this yet but based on my understanding of how the consumer works, it seems like it should be OK. I am hoping that I can call shutdown() at anytime and that it will unblock any blocking calls.

Thanks,
Paul


Re: high-level 0.8 consumer API questions

Posted by Guozhang Wang <wa...@gmail.com>.
Hello Paul,

1. Yes it is OK. Actually each MirrorMaker process may use multiple
ConsumerConnectors.

2. Yes it is OK.

Guozhang


On Fri, Aug 16, 2013 at 8:29 AM, Paul Mackles <pm...@adobe.com> wrote:

> Hi - I am making a few assumptions about the 0.8 high-level consumer API
> that I am looking to confirm:
>
> -it is OK to have multiple ConsumerConnector objects in the same process?
> To be sure, they are all operating independently. I could probably shove
> everything into one ConsumerConnector if I had to but its easier to manage
> with separate objects and I have enough memory. Anyone aware of any gotchas
> with this? I haven't seen any issues with this so far but my testing hasn't
> been exhaustive (2 or 3 at at time).
>
> -is it OK to call ConsumerConnector.shutdown() whenever I want? In other
> words, if I find out that a downstream process has failed, can I just call
> ConsumerConnector.shutdown() at that moment (from another thread) or do I
> need to wait until the next ConsumerTimeout and call shutdown then? I
> haven't had a chance to test this yet but based on my understanding of how
> the consumer works, it seems like it should be OK. I am hoping that I can
> call shutdown() at anytime and that it will unblock any blocking calls.
>
> Thanks,
> Paul
>
>


-- 
-- Guozhang