[jira] [Commented] (KAFKA-14373) provide builders for producer/consumer

2023-04-14 Thread Daniel Scanteianu (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-14373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17712211#comment-17712211
 ] 

Daniel Scanteianu commented on KAFKA-14373:
---

possibly a duplicate of https://issues.apache.org/jira/browse/KAFKA-13913 

> provide builders for producer/consumer
> --
>
> Key: KAFKA-14373
> URL: https://issues.apache.org/jira/browse/KAFKA-14373
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Reporter: Daniel Scanteianu
>Priority: Minor
>
> creating a producer/consumer involves looking up the consts for kafka 
> configuration, and usually doing a lot of googling for what the possible 
> values are for each configuration. Providing a builder where there are named 
> methods to set various configuration, with meaningful parameters (ie: enums 
> for configurations that can only have a few values), and good javadoc would 
> make it much easier from developers working from ides (such as intellij, 
> eclipse, netbeans, etc) to discover the various configurations, and navigate 
> to the documentation for the various options when creating 
> producers/consumers.
> Examples:
> Pseudocode:
> Producer:
>  
> {code:java}
> ProducerBuilder(String bootstrapUrl)
> { ... }
> ProducerBuilder withTransactionsEnabled(String transactionalId){ ... // 
> internally sets a flag so that transactions are initialized when producer is 
> built }
> Producer build(){ ... }
> {code}
>  
> Salient Consumer Example:
> {code:java}
> /**
> *
> * @param strategy : if the strategy is set to NONE, then an error is thrown 
> if a valid offset is passed to seek (etc.), if it is set to EARLIEST, then 
> the consumer will seek to beginning (etc).
> */
> ConsumerBuilder withAutoOffsetResetStrategy(OffsetResetStrategy strategy){ 
> ... } {code}
>  
> where OffsetResetStrategy is an enum with 3 values 
> {code:java}
> public enum OffsetResetStrategy {EARLIEST,LATEST, NONE}{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (KAFKA-14841) Call ConsumerRebalanceListener when MockConsumer rebalanced

2023-03-23 Thread Daniel Scanteianu (Jira)


 [ 
https://issues.apache.org/jira/browse/KAFKA-14841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Scanteianu updated KAFKA-14841:
--
Description: Currently, passing a custom ConsumerRebalanceListener to mock 
client is supported, but if a rebalance actually happens, the 
ConsumerRebalanceListener is not notified of assigned or revoked 
TopicPartitions. After this change, if a rebalance occurs, the 
ConsumerRebalanceListener will be notified with the corresponding topic 
partition changes.  (was: Currently, passing a custom ConsumerRebalanceListener 
to mock client is supported, but if a rebalance actually happens, the 
ConsumerRebalanceListener is not notified of assigned or revoked 
TopicPartitions.)

> Call ConsumerRebalanceListener when MockConsumer rebalanced
> ---
>
> Key: KAFKA-14841
> URL: https://issues.apache.org/jira/browse/KAFKA-14841
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Reporter: Daniel Scanteianu
>Assignee: Daniel Scanteianu
>Priority: Minor
>
> Currently, passing a custom ConsumerRebalanceListener to mock client is 
> supported, but if a rebalance actually happens, the ConsumerRebalanceListener 
> is not notified of assigned or revoked TopicPartitions. After this change, if 
> a rebalance occurs, the ConsumerRebalanceListener will be notified with the 
> corresponding topic partition changes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (KAFKA-14841) Call ConsumerRebalanceListener when MockConsumer rebalanced

2023-03-23 Thread Daniel Scanteianu (Jira)
Daniel Scanteianu created KAFKA-14841:
-

 Summary: Call ConsumerRebalanceListener when MockConsumer 
rebalanced
 Key: KAFKA-14841
 URL: https://issues.apache.org/jira/browse/KAFKA-14841
 Project: Kafka
  Issue Type: Improvement
  Components: clients
Reporter: Daniel Scanteianu
Assignee: Daniel Scanteianu


Currently, passing a custom ConsumerRebalanceListener to mock client is 
supported, but if a rebalance actually happens, the ConsumerRebalanceListener 
is not notified of assigned or revoked TopicPartitions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (KAFKA-14373) provide builders for producer/consumer

2022-11-10 Thread Daniel Scanteianu (Jira)


 [ 
https://issues.apache.org/jira/browse/KAFKA-14373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Scanteianu updated KAFKA-14373:
--
Description: 
creating a producer/consumer involves looking up the consts for kafka 
configuration, and usually doing a lot of googling for what the possible values 
are for each configuration. Providing a builder where there are named methods 
to set various configuration, with meaningful parameters (ie: enums for 
configurations that can only have a few values), and good javadoc would make it 
much easier from developers working from ides (such as intellij, eclipse, 
netbeans, etc) to discover the various configurations, and navigate to the 
documentation for the various options when creating producers/consumers.

Examples:

Pseudocode:

Producer:

 
{code:java}
ProducerBuilder(String bootstrapUrl)
{ ... }
ProducerBuilder withTransactionsEnabled(String transactionalId){ ... // 
internally sets a flag so that transactions are initialized when producer is 
built }
Producer build(){ ... }


{code}
 

Salient Consumer Example:
{code:java}
/**
*
* @param strategy : if the strategy is set to NONE, then an error is thrown if 
a valid offset is passed to seek (etc.), if it is set to EARLIEST, then the 
consumer will seek to beginning (etc).
*/
ConsumerBuilder withAutoOffsetResetStrategy(OffsetResetStrategy strategy){ ... 
} {code}
 

where OffsetResetStrategy is an enum with 3 values 
{code:java}
public enum OffsetResetStrategy {EARLIEST,LATEST, NONE}{code}

  was:
creating a producer/consumer involves looking up the consts for kafka 
configuration, and usually doing a lot of googling for what the possible values 
are for each configuration. Providing a builder where there are named methods 
to set various configuration, with meaningful parameters (ie: enums for 
configurations that can only have a few values), and good javadoc would make it 
much easier from developers working from ides (such as intellij, eclipse, 
netbeans, etc) to discover the various configurations, and navigate to the 
documentation for the various options when creating producers/consumers.

A salient consumer example: 

Examples:

Pseudocode:

Producer:

 
{code:java}
ProducerBuilder(String bootstrapUrl)
{ ... }
ProducerBuilder withTransactionsEnabled(String transactionalId){ ... // 
internally sets a flag so that transactions are initialized when producer is 
built }
Producer build(){ ... }


{code}
 


Salient Consumer Example:
{code:java}
/**
*
* @param strategy : if the strategy is set to NONE, then an error is thrown if 
a valid offset is passed to seek (etc.), if it is set to EARLIEST, then the 
consumer will seek to beginning (etc).
*/
ConsumerBuilder withAutoOffsetResetStrategy(OffsetResetStrategy strategy){ ... 
} {code}
 

where OffsetResetStrategy is an enum with 3 values 
{code:java}
public enum OffsetResetStrategy {EARLIEST,LATEST, NONE}{code}


> provide builders for producer/consumer
> --
>
> Key: KAFKA-14373
> URL: https://issues.apache.org/jira/browse/KAFKA-14373
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Reporter: Daniel Scanteianu
>Priority: Minor
>
> creating a producer/consumer involves looking up the consts for kafka 
> configuration, and usually doing a lot of googling for what the possible 
> values are for each configuration. Providing a builder where there are named 
> methods to set various configuration, with meaningful parameters (ie: enums 
> for configurations that can only have a few values), and good javadoc would 
> make it much easier from developers working from ides (such as intellij, 
> eclipse, netbeans, etc) to discover the various configurations, and navigate 
> to the documentation for the various options when creating 
> producers/consumers.
> Examples:
> Pseudocode:
> Producer:
>  
> {code:java}
> ProducerBuilder(String bootstrapUrl)
> { ... }
> ProducerBuilder withTransactionsEnabled(String transactionalId){ ... // 
> internally sets a flag so that transactions are initialized when producer is 
> built }
> Producer build(){ ... }
> {code}
>  
> Salient Consumer Example:
> {code:java}
> /**
> *
> * @param strategy : if the strategy is set to NONE, then an error is thrown 
> if a valid offset is passed to seek (etc.), if it is set to EARLIEST, then 
> the consumer will seek to beginning (etc).
> */
> ConsumerBuilder withAutoOffsetResetStrategy(OffsetResetStrategy strategy){ 
> ... } {code}
>  
> where OffsetResetStrategy is an enum with 3 values 
> {code:java}
> public enum OffsetResetStrategy {EARLIEST,LATEST, NONE}{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (KAFKA-14373) provide builders for producer/consumer

2022-11-09 Thread Daniel Scanteianu (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-14373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17631498#comment-17631498
 ] 

Daniel Scanteianu commented on KAFKA-14373:
---

Thanks, following the process in the link you sent!

> provide builders for producer/consumer
> --
>
> Key: KAFKA-14373
> URL: https://issues.apache.org/jira/browse/KAFKA-14373
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Reporter: Daniel Scanteianu
>Priority: Minor
>
> creating a producer/consumer involves looking up the consts for kafka 
> configuration, and usually doing a lot of googling for what the possible 
> values are for each configuration. Providing a builder where there are named 
> methods to set various configuration, with meaningful parameters (ie: enums 
> for configurations that can only have a few values), and good javadoc would 
> make it much easier from developers working from ides (such as intellij, 
> eclipse, netbeans, etc) to discover the various configurations, and navigate 
> to the documentation for the various options when creating 
> producers/consumers.
> A salient consumer example: 
> Examples:
> Pseudocode:
> Producer:
>  
> {code:java}
> ProducerBuilder(String bootstrapUrl)
> { ... }
> ProducerBuilder withTransactionsEnabled(String transactionalId){ ... // 
> internally sets a flag so that transactions are initialized when producer is 
> built }
> Producer build(){ ... }
> {code}
>  
> Salient Consumer Example:
> {code:java}
> /**
> *
> * @param strategy : if the strategy is set to NONE, then an error is thrown 
> if a valid offset is passed to seek (etc.), if it is set to EARLIEST, then 
> the consumer will seek to beginning (etc).
> */
> ConsumerBuilder withAutoOffsetResetStrategy(OffsetResetStrategy strategy){ 
> ... } {code}
>  
> where OffsetResetStrategy is an enum with 3 values 
> {code:java}
> public enum OffsetResetStrategy {EARLIEST,LATEST, NONE}{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (KAFKA-14373) provide builders for producer/consumer

2022-11-09 Thread Daniel Scanteianu (Jira)


 [ 
https://issues.apache.org/jira/browse/KAFKA-14373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Scanteianu updated KAFKA-14373:
--
Description: 
creating a producer/consumer involves looking up the consts for kafka 
configuration, and usually doing a lot of googling for what the possible values 
are for each configuration. Providing a builder where there are named methods 
to set various configuration, with meaningful parameters (ie: enums for 
configurations that can only have a few values), and good javadoc would make it 
much easier from developers working from ides (such as intellij, eclipse, 
netbeans, etc) to discover the various configurations, and navigate to the 
documentation for the various options when creating producers/consumers.

A salient consumer example: 

Examples:

Pseudocode:

Producer:

 
{code:java}
ProducerBuilder(String bootstrapUrl)
{ ... }
ProducerBuilder withTransactionsEnabled(String transactionalId){ ... // 
internally sets a flag so that transactions are initialized when producer is 
built }
Producer build(){ ... }


{code}
 


Salient Consumer Example:
{code:java}
/**
*
* @param strategy : if the strategy is set to NONE, then an error is thrown if 
a valid offset is passed to seek (etc.), if it is set to EARLIEST, then the 
consumer will seek to beginning (etc).
*/
ConsumerBuilder withAutoOffsetResetStrategy(OffsetResetStrategy strategy){ ... 
} {code}
 

where OffsetResetStrategy is an enum with 3 values 
{code:java}
public enum OffsetResetStrategy {EARLIEST,LATEST, NONE}{code}

  was:
creating a producer/consumer involves looking up the consts for kafka 
configuration, and usually doing a lot of googling for what the possible values 
are for each configuration. Providing a builder where there are named methods 
to set various configuration, with meaningful parameters (ie: enums for 
configurations that can only have a few values), and good javadoc would make it 
much easier from developers working from ides (such as intellij, eclipse, 
netbeans, etc) to discover the various configurations, and navigate to the 
documentation for the various options when creating producers/consumers.

A salient consumer example: 

Examples:

Pseudocode:

Producer:

```

ProducerBuilder(String bootstrapUrl)

{ ... }

ProducerBuilder withTransactionsEnabled(String transactionalId)\{ ... // 
internally sets a flag so that transactions are initialized when producer is 
built }

Producer build()\{ ... }
```
Salient Consumer Example:

```
/**
* 
* @param strategy : if the strategy is set to NONE, then an error is thrown if 
a valid offset is passed to seek (etc.), if it is set to EARLIEST, then the 
consumer will seek to beginning (etc).
*/
ConsumerBuilder withAutoOffsetResetStrategy(OffsetResetStrategy strategy)\{ ... 
}

where OffsetResetStrategy is an enum with 3 values (EARLIEST,LATEST, NONE)
```


> provide builders for producer/consumer
> --
>
> Key: KAFKA-14373
> URL: https://issues.apache.org/jira/browse/KAFKA-14373
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Reporter: Daniel Scanteianu
>Priority: Minor
>
> creating a producer/consumer involves looking up the consts for kafka 
> configuration, and usually doing a lot of googling for what the possible 
> values are for each configuration. Providing a builder where there are named 
> methods to set various configuration, with meaningful parameters (ie: enums 
> for configurations that can only have a few values), and good javadoc would 
> make it much easier from developers working from ides (such as intellij, 
> eclipse, netbeans, etc) to discover the various configurations, and navigate 
> to the documentation for the various options when creating 
> producers/consumers.
> A salient consumer example: 
> Examples:
> Pseudocode:
> Producer:
>  
> {code:java}
> ProducerBuilder(String bootstrapUrl)
> { ... }
> ProducerBuilder withTransactionsEnabled(String transactionalId){ ... // 
> internally sets a flag so that transactions are initialized when producer is 
> built }
> Producer build(){ ... }
> {code}
>  
> Salient Consumer Example:
> {code:java}
> /**
> *
> * @param strategy : if the strategy is set to NONE, then an error is thrown 
> if a valid offset is passed to seek (etc.), if it is set to EARLIEST, then 
> the consumer will seek to beginning (etc).
> */
> ConsumerBuilder withAutoOffsetResetStrategy(OffsetResetStrategy strategy){ 
> ... } {code}
>  
> where OffsetResetStrategy is an enum with 3 values 
> {code:java}
> public enum OffsetResetStrategy {EARLIEST,LATEST, NONE}{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (KAFKA-14373) provide builders for producer/consumer

2022-11-09 Thread Daniel Scanteianu (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-14373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17631334#comment-17631334
 ] 

Daniel Scanteianu commented on KAFKA-14373:
---

i am happy to code this

> provide builders for producer/consumer
> --
>
> Key: KAFKA-14373
> URL: https://issues.apache.org/jira/browse/KAFKA-14373
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Reporter: Daniel Scanteianu
>Priority: Minor
>
> creating a producer/consumer involves looking up the consts for kafka 
> configuration, and usually doing a lot of googling for what the possible 
> values are for each configuration. Providing a builder where there are named 
> methods to set various configuration, with meaningful parameters (ie: enums 
> for configurations that can only have a few values), and good javadoc would 
> make it much easier from developers working from ides (such as intellij, 
> eclipse, netbeans, etc) to discover the various configurations, and navigate 
> to the documentation for the various options when creating 
> producers/consumers.
> A salient consumer example: 
> Examples:
> Pseudocode:
> Producer:
> ProducerBuilder(String bootstrapUrl){
> ...
> }
> ProducerBuilder withTransactionsEnabled(String transactionalId){
> ...
> // internally sets a flag so that transactions are initialized when producer 
> is built
> }
> Producer build(){
> ...
> }
> Salient Consumer Example:
> /**
> * 
> * @param strategy : if the strategy is set to NONE, then an error is thrown 
> if a valid offset is passed to seek (etc.), if it is set to EARLIEST, then 
> the consumer will seek to beginning (etc).
> */
> ConsumerBuilder withAutoOffsetResetStrategy(OffsetResetStrategy strategy){
> ...
> }
> where OffsetResetStrategy is an enum with 3 values (EARLIEST,LATEST, NONE)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (KAFKA-14373) provide builders for producer/consumer

2022-11-09 Thread Daniel Scanteianu (Jira)


 [ 
https://issues.apache.org/jira/browse/KAFKA-14373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Scanteianu updated KAFKA-14373:
--
Description: 
creating a producer/consumer involves looking up the consts for kafka 
configuration, and usually doing a lot of googling for what the possible values 
are for each configuration. Providing a builder where there are named methods 
to set various configuration, with meaningful parameters (ie: enums for 
configurations that can only have a few values), and good javadoc would make it 
much easier from developers working from ides (such as intellij, eclipse, 
netbeans, etc) to discover the various configurations, and navigate to the 
documentation for the various options when creating producers/consumers.

A salient consumer example: 

Examples:

Pseudocode:

Producer:

```

ProducerBuilder(String bootstrapUrl)

{ ... }

ProducerBuilder withTransactionsEnabled(String transactionalId)\{ ... // 
internally sets a flag so that transactions are initialized when producer is 
built }

Producer build()\{ ... }
```
Salient Consumer Example:

```
/**
* 
* @param strategy : if the strategy is set to NONE, then an error is thrown if 
a valid offset is passed to seek (etc.), if it is set to EARLIEST, then the 
consumer will seek to beginning (etc).
*/
ConsumerBuilder withAutoOffsetResetStrategy(OffsetResetStrategy strategy)\{ ... 
}

where OffsetResetStrategy is an enum with 3 values (EARLIEST,LATEST, NONE)
```

  was:
creating a producer/consumer involves looking up the consts for kafka 
configuration, and usually doing a lot of googling for what the possible values 
are for each configuration. Providing a builder where there are named methods 
to set various configuration, with meaningful parameters (ie: enums for 
configurations that can only have a few values), and good javadoc would make it 
much easier from developers working from ides (such as intellij, eclipse, 
netbeans, etc) to discover the various configurations, and navigate to the 
documentation for the various options when creating producers/consumers.

A salient consumer example: 

Examples:

Pseudocode:

Producer:

ProducerBuilder(String bootstrapUrl){
...
}

ProducerBuilder withTransactionsEnabled(String transactionalId){
...
// internally sets a flag so that transactions are initialized when producer is 
built
}

Producer build(){

...

}

Salient Consumer Example:
/**
* 
* @param strategy : if the strategy is set to NONE, then an error is thrown if 
a valid offset is passed to seek (etc.), if it is set to EARLIEST, then the 
consumer will seek to beginning (etc).
*/
ConsumerBuilder withAutoOffsetResetStrategy(OffsetResetStrategy strategy){
...
}
where OffsetResetStrategy is an enum with 3 values (EARLIEST,LATEST, NONE)


> provide builders for producer/consumer
> --
>
> Key: KAFKA-14373
> URL: https://issues.apache.org/jira/browse/KAFKA-14373
> Project: Kafka
>  Issue Type: Improvement
>  Components: clients
>Reporter: Daniel Scanteianu
>Priority: Minor
>
> creating a producer/consumer involves looking up the consts for kafka 
> configuration, and usually doing a lot of googling for what the possible 
> values are for each configuration. Providing a builder where there are named 
> methods to set various configuration, with meaningful parameters (ie: enums 
> for configurations that can only have a few values), and good javadoc would 
> make it much easier from developers working from ides (such as intellij, 
> eclipse, netbeans, etc) to discover the various configurations, and navigate 
> to the documentation for the various options when creating 
> producers/consumers.
> A salient consumer example: 
> Examples:
> Pseudocode:
> Producer:
> ```
> ProducerBuilder(String bootstrapUrl)
> { ... }
> ProducerBuilder withTransactionsEnabled(String transactionalId)\{ ... // 
> internally sets a flag so that transactions are initialized when producer is 
> built }
> Producer build()\{ ... }
> ```
> Salient Consumer Example:
> ```
> /**
> * 
> * @param strategy : if the strategy is set to NONE, then an error is thrown 
> if a valid offset is passed to seek (etc.), if it is set to EARLIEST, then 
> the consumer will seek to beginning (etc).
> */
> ConsumerBuilder withAutoOffsetResetStrategy(OffsetResetStrategy strategy)\{ 
> ... }
> where OffsetResetStrategy is an enum with 3 values (EARLIEST,LATEST, NONE)
> ```



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (KAFKA-14373) provide builders for producer/consumer

2022-11-09 Thread Daniel Scanteianu (Jira)
Daniel Scanteianu created KAFKA-14373:
-

 Summary: provide builders for producer/consumer
 Key: KAFKA-14373
 URL: https://issues.apache.org/jira/browse/KAFKA-14373
 Project: Kafka
  Issue Type: Improvement
  Components: clients
Reporter: Daniel Scanteianu


creating a producer/consumer involves looking up the consts for kafka 
configuration, and usually doing a lot of googling for what the possible values 
are for each configuration. Providing a builder where there are named methods 
to set various configuration, with meaningful parameters (ie: enums for 
configurations that can only have a few values), and good javadoc would make it 
much easier from developers working from ides (such as intellij, eclipse, 
netbeans, etc) to discover the various configurations, and navigate to the 
documentation for the various options when creating producers/consumers.

A salient consumer example: 

Examples:

Pseudocode:

Producer:

ProducerBuilder(String bootstrapUrl){
...
}

ProducerBuilder withTransactionsEnabled(String transactionalId){
...
// internally sets a flag so that transactions are initialized when producer is 
built
}

Producer build(){

...

}

Salient Consumer Example:
/**
* 
* @param strategy : if the strategy is set to NONE, then an error is thrown if 
a valid offset is passed to seek (etc.), if it is set to EARLIEST, then the 
consumer will seek to beginning (etc).
*/
ConsumerBuilder withAutoOffsetResetStrategy(OffsetResetStrategy strategy){
...
}
where OffsetResetStrategy is an enum with 3 values (EARLIEST,LATEST, NONE)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)