Re: How to assign client-id to a particular kafka producer or topic?

2017-03-31 Thread Hans Jespersen
username comes from authenticated clients
client.id can be assigned by any client (no authentication required).

It’s hard to enforce a quota on a client.id when the clients can just change 
the code to use a difference client.id, hence the recent enhancement to add 
user quotas based on the authenticated username which cannot be changed without 
the consent of the broker administrator.

0hans



> On Mar 31, 2017, at 9:16 AM, Archie  wrote:
> 
> Thanks for the reply. I had few more questions regarding quotas
> 
> What is the difference between the user-quota and client-quota? How can we
> assign user-id to producers?
> 
> Also is it possible to assign client-id to a topic (or) partitions
> belonging to a topic? If yes how can we do that?
> 
> 
> 
> 
> Thanks,
> Archie
> 
> On Fri, Mar 31, 2017 at 11:05 AM, Manikumar 
> wrote:
> 
>> you can pass client-id using --producer-props option.
>> ex: --producer-props client.id=id1
>> 
>> On Fri, Mar 31, 2017 at 9:32 PM, Archie 
>> wrote:
>> 
>>> I know that quotas are based on client-id
>>> 
>>> Basically I want to run the kafka-producer-perf-test with a particular
>>> client id to test whether the quotas work properly
>>> 
>>> My question is how can I assign a client-id for a particular producer
>> (or)
>>> partition?
>>> 
>>> 
>>> 
>>> Thanks,
>>> Archie
>>> 
>> 



Re: How to assign client-id to a particular kafka producer or topic?

2017-03-31 Thread Manikumar
Quotas can be configured for  (user, client-id), user and client-id groups.
user is the principal name of client authentication connection. In
user-quota,
all clients with same principal/user name will share the same quota.
client-id is the logical name given to client(s). in client-quota, all
clients with
the same client-id, will share the same quota. client-id is only applicable
to
kafka-clients(producer, consumer, ..)

More details here:
http://kafka.apache.org/documentation.html#design_quotas
https://cwiki.apache.org/confluence/display/KAFKA/KIP-55%3A+Secure+Quotas+for+Authenticated+Users

On Fri, Mar 31, 2017 at 9:46 PM, Archie  wrote:

> Thanks for the reply. I had few more questions regarding quotas
>
> What is the difference between the user-quota and client-quota? How can we
> assign user-id to producers?
>
> Also is it possible to assign client-id to a topic (or) partitions
> belonging to a topic? If yes how can we do that?
>
>
>
>
> Thanks,
> Archie
>
> On Fri, Mar 31, 2017 at 11:05 AM, Manikumar 
> wrote:
>
> > you can pass client-id using --producer-props option.
> > ex: --producer-props client.id=id1
> >
> > On Fri, Mar 31, 2017 at 9:32 PM, Archie 
> > wrote:
> >
> > > I know that quotas are based on client-id
> > >
> > > Basically I want to run the kafka-producer-perf-test with a particular
> > > client id to test whether the quotas work properly
> > >
> > > My question is how can I assign a client-id for a particular producer
> > (or)
> > > partition?
> > >
> > >
> > >
> > > Thanks,
> > > Archie
> > >
> >
>


Re: How to assign client-id to a particular kafka producer or topic?

2017-03-31 Thread Archie
Thanks for the reply. I had few more questions regarding quotas

What is the difference between the user-quota and client-quota? How can we
assign user-id to producers?

Also is it possible to assign client-id to a topic (or) partitions
belonging to a topic? If yes how can we do that?




Thanks,
Archie

On Fri, Mar 31, 2017 at 11:05 AM, Manikumar 
wrote:

> you can pass client-id using --producer-props option.
> ex: --producer-props client.id=id1
>
> On Fri, Mar 31, 2017 at 9:32 PM, Archie 
> wrote:
>
> > I know that quotas are based on client-id
> >
> > Basically I want to run the kafka-producer-perf-test with a particular
> > client id to test whether the quotas work properly
> >
> > My question is how can I assign a client-id for a particular producer
> (or)
> > partition?
> >
> >
> >
> > Thanks,
> > Archie
> >
>


Re: How to assign client-id to a particular kafka producer or topic?

2017-03-31 Thread Manikumar
you can pass client-id using --producer-props option.
ex: --producer-props client.id=id1

On Fri, Mar 31, 2017 at 9:32 PM, Archie  wrote:

> I know that quotas are based on client-id
>
> Basically I want to run the kafka-producer-perf-test with a particular
> client id to test whether the quotas work properly
>
> My question is how can I assign a client-id for a particular producer (or)
> partition?
>
>
>
> Thanks,
> Archie
>


How to assign client-id to a particular kafka producer or topic?

2017-03-31 Thread Archie
I know that quotas are based on client-id

Basically I want to run the kafka-producer-perf-test with a particular
client id to test whether the quotas work properly

My question is how can I assign a client-id for a particular producer (or)
partition?



Thanks,
Archie