# S3SinkConnector: mismatch message count on S3

**URL:** <https://forum.confluent.io/t/s3sinkconnector-mismatch-message-count-on-s3/4646>\
**Category:** Kafka Connect\
**Created:** [31 March 2022 13:32 UTC](https://forum.confluent.io/t/s3sinkconnector-mismatch-message-count-on-s3/4646 "2022-03-31T13:32:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shortcode](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@shortcode](https://forum.confluent.io/u/shortcode)\
**Post date:** [31 March 2022 13:32 UTC](https://forum.confluent.io/t/s3sinkconnector-mismatch-message-count-on-s3/4646/1 "2022-03-31T13:32:26Z")

</div>

Hi, I’ve ~130M messages (280 partitions) on Kafka. Using below config writing them to S3. Seeing lag is ~100 for my consumer. when I check S3 it has ~30M messages.  
what could be a problem. There is no error on logs.

“config”: {

```
"connector.class": "S3SinkConnector",

"topics": "xxxx",

"s3.bucket.name": "xxx",

"format.class": "io.confluent.connect.s3.format.parquet.ParquetFormat",

"parquet.codec": "snappy",

"storage.class": "io.confluent.connect.s3.storage.S3Storage",

"flush.size": "2147483647",

"s3.region": "xxx,

"tasks.max": "3",

"partition.duration.ms": "3600000",

"partitioner.class": "io.confluent.connect.storage.partitioner.TimeBasedPartitioner",

"locale": "en-US",

"timezone": "UTC",

"rotate.schedule.interval.ms": "3600000",

"rotate.interval.ms": "3600000",

"path.format": "YYYY-MM-dd",

"timestamp.extractor": "Record",

"transforms": "ReplaceField",

"transforms.ReplaceField.type": "org.apache.kafka.connect.transforms.ReplaceField$Value",

"transforms.ReplaceField.blacklist": "xxxxx"

```

}

---

<div class="post-metadata">

**Author:** ![OneCricketeer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/onecricketeer/32/1551_2.png) [@OneCricketeer](https://forum.confluent.io/u/OneCricketeer)\
**Post date:** [31 March 2022 19:50 UTC](https://forum.confluent.io/t/s3sinkconnector-mismatch-message-count-on-s3/4646/2 "2022-03-31T19:50:09Z")

</div>

How are you checking the files? You will have records distributed over multiple files, across multiple YYYY-mm-dd prefixes… And 3600000ms is not equal to one day for your partitioning scheme.

Note: You may not want **both** `rotate.schedule.interval.ms` and `rotate.interval.ms`.

---

<div class="post-metadata">

**Author:** ![shortcode](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@shortcode](https://forum.confluent.io/u/shortcode)\
**Post date:** [31 March 2022 20:04 UTC](https://forum.confluent.io/t/s3sinkconnector-mismatch-message-count-on-s3/4646/3 "2022-03-31T20:04:50Z")

</div>

I just setup for hour.  
I’ve talked with the owner of topic. it seems they just delete messages but offset info still show 130M records. so false alarm!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [30 April 2022 20:05 UTC](https://forum.confluent.io/t/s3sinkconnector-mismatch-message-count-on-s3/4646/4 "2022-04-30T20:05:01Z")

</div>

Closed on 30 April 2022 20:05 UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
