# HTTP Sink Connector Batching not working

**URL:** <https://forum.confluent.io/t/http-sink-connector-batching-not-working/6905>\
**Category:** Kafka Connect\
**Created:** [26 December 2022 10:26 UTC](https://forum.confluent.io/t/http-sink-connector-batching-not-working/6905 "2022-12-26T10:26:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dixitsingla](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dixitsingla/32/2620_2.png) [@dixitsingla](https://forum.confluent.io/u/dixitsingla)\
**Post date:** [26 December 2022 10:26 UTC](https://forum.confluent.io/t/http-sink-connector-batching-not-working/6905/1 "2022-12-26T10:26:52Z")

</div>

I am using below HTTP Sink connector config and it is still sending records one by one. It is supposed to send data in a batch of 50 messages.

```auto
{
	"name": "HTTPSinkConnector_1",
	"config": {
		"topics": "topic_1",
		"tasks.max": "1",
		"connector.class": "io.confluent.connect.http.HttpSinkConnector",
		"http.api.url": "http://localhost/messageHandler",
		"request.method": "POST",
		"key.converter":"org.apache.kafka.connect.storage.StringConverter",
		"value.converter": "io.confluent.connect.avro.AvroConverter",
		"value.converter.schema.registry.url": "http://schema-registry:8081",
		"confluent.topic.bootstrap.servers": "kafka:19092",
		"confluent.topic.replication.factor": "1",
		"batching.enabled": true,
		"batch.max.size": 50,
		"reporter.bootstrap.servers": "kafka:19092",
		"reporter.result.topic.name": "success-responses",
		"reporter.result.topic.replication.factor": "1",
		"reporter.error.topic.name": "error-responses",
		"reporter.error.topic.replication.factor": "1",
		"request.body.format": "json"
	}
}

```

Could someone please suggest if any another property is missing.

---

<div class="post-metadata">

**Author:** ![danicafine](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/danicafine/32/2995_2.png) [@danicafine](https://forum.confluent.io/u/danicafine)\
**Post date:** [24 January 2023 21:48 UTC](https://forum.confluent.io/t/http-sink-connector-batching-not-working/6905/2 "2023-01-24T21:48:06Z")

</div>

Have you checked your message headers and their values? As per the [docs](https://docs.confluent.io/kafka-connectors/http/current/overview.html#http-sink-connector-for-cp):

> The HTTP Sink connector does not batch requests for messages containing Kafka header values that are different.

---

<div class="post-metadata">

**Author:** ![dixitsingla](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dixitsingla/32/2620_2.png) [@dixitsingla](https://forum.confluent.io/u/dixitsingla)\
**Post date:** [8 February 2023 06:03 UTC](https://forum.confluent.io/t/http-sink-connector-batching-not-working/6905/3 "2023-02-08T06:03:56Z")

</div>

Yes, It is due to different header values.  
Is there any way to drop the headers and make the batching working?

---

<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:** [10 March 2023 06:04 UTC](https://forum.confluent.io/t/http-sink-connector-batching-not-working/6905/4 "2023-03-10T06:04:09Z")

</div>

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