sandeep-mst opened a new issue, #23:
URL: https://github.com/apache/pulsar-connectors/issues/23

   ### Search before reporting
   
   - [x] I searched in the 
[issues](https://github.com/apache/pulsar-connector/issues) and found nothing 
similar.
   
   
   ### Read release policy
   
   - [x] I understand that [unsupported 
versions](https://pulsar.apache.org/contribute/release-policy/#supported-versions)
 don't get bug fixes. I will attempt to reproduce the issue on a supported 
version of Pulsar client and Pulsar broker.
   
   
   ### User environment
   
   master
   
   ### Issue Description
   
   During testing kafka-connect-adapter, we observed that the initial 
acknowledgment for a record is not sent until a new record is added. This 
occurs when the initial record has an offset of zero. When a subsequent record 
with a non-zero offset is written to the sink, acknowledgments for both records 
are sent.
   
   A record can have an offset of zero when `useIndexAsOffset == true` and the 
message index is zero. There are other cases where the computed offset can be 
zero, see:
   
https://github.com/apache/pulsar-connectors/blob/b8760955f20db284c7779e38ca993ecedb5e563c/kafka-connect-adaptor/src/main/java/org/apache/pulsar/io/kafka/connect/KafkaConnectSink.java#L334
   
   ### Error messages
   
   ```text
   
   ```
   
   ### Reproducing the issue
   
   1. Send a single record whose offset is computed to `zero`
   2. This record will not be acknowledged until a new record with non zero 
offset is written to the sink and acknowledgements are flushed again.
   ### Additional information
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to