# Kafka Trigger Error

**URL:** <https://community.n8n.io/t/kafka-trigger-error/17368>\
**Category:** Questions\
**Tags:** trigger, kafka\
**Created:** [September 4, 2022, 9:32pm UTC](https://community.n8n.io/t/kafka-trigger-error/17368 "2022-09-04T21:32:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tolga\_Kavukcu](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/tolga_kavukcu/32/3328_2.png) [@Tolga\_Kavukcu](https://community.n8n.io/u/Tolga_Kavukcu)\
**Post date:** [September 4, 2022, 9:32pm UTC](https://community.n8n.io/t/kafka-trigger-error/17368/1 "2022-09-04T21:32:24Z")

</div>

## Describe the issue/error/question

I receive the below error when I use kafka trigger. I tried with two different kafka clusters including a remote one and local one via this docker-compose. But I cannot fix the error I always get the same error, could you please help me to identify what’s wrong. This happens when I listen for a test event or start the flow.

```auto
version: "2"

services:
  zookeeper:
    image: docker.io/bitnami/zookeeper:3.8
    ports:
      - "2181:2181"
    volumes:
      - "zookeeper_data:/bitnami"
    environment:
      - ALLOW_ANONYMOUS_LOGIN=yes
  kafka:
    image: docker.io/bitnami/kafka:3.2
    ports:
      - "9092:9092"
    volumes:
      - "kafka_data:/bitnami"
    environment:
      - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
      - ALLOW_PLAINTEXT_LISTENER=yes
    depends_on:
      - zookeeper

volumes:
  zookeeper_data:
    driver: local
  kafka_data:
    driver: local

```

## What is the error message (if any)?

{“level”:“ERROR”,“timestamp”:“2022-09-04T21:23:59.297Z”,“logger”:“kafkajs”,“message”:“[BrokerPool] Closed connection”,“retryCount”:0,“retryTime”:321}

{“level”:“ERROR”,“timestamp”:“2022-09-04T21:25:33.436Z”,“logger”:“kafkajs”,“message”:“[BrokerPool] Closed connection”,“retryCount”:0,“retryTime”:329}

## Please share the workflow

(Sorry I cannot share whole flow as it has business logic)

## Share the output returned by the last node

N/A

## Information on your n8n setup

- 0.193.3
- \*\*Database you’re using (default: SQLite):SQLite
- \*\*Running n8n with the execution process [own(default), main]:own
- **Running n8n via [Docker, npm, n8n.cloud, desktop app]:** npm and docker

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [September 5, 2022, 8:06am UTC](https://community.n8n.io/t/kafka-trigger-error/17368/2 "2022-09-05T08:06:27Z")

</div>

Hey @Tolga_Kavukcu,

Welcome to the community 🎉

As a quick test can you try setting `Max Number of Requests` to 1 or use an expression and put `{{null}}` in there to see if that helps?

I am aware of an issue with the Kafka trigger so I want to check if you are seeing the same problem or if this is possibly just a networking issue. Have you also tried sending a message to the Kafka queue?

---

<div class="post-metadata">

**Author:** ![Tolga\_Kavukcu](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/tolga_kavukcu/32/3328_2.png) [@Tolga\_Kavukcu](https://community.n8n.io/u/Tolga_Kavukcu)\
**Post date:** [September 5, 2022, 9:00am UTC](https://community.n8n.io/t/kafka-trigger-error/17368/4 "2022-09-05T09:00:14Z")

</div>

Hi @Jon

Thanks for your response

I tried setting `Max Number of Requests` to 1 and {{null}}, this actually worked. My question would be what should be the value for the prod execution ? What should I configure for consuming messages continuously

Regards

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [September 5, 2022, 9:03am UTC](https://community.n8n.io/t/kafka-trigger-error/17368/5 "2022-09-05T09:03:58Z")

</div>

Hey @Tolga_Kavukcu,

The request number would depend on your environment but I would say if you use `{{null}}` which “should” be the default it will just work it out itself.

Luckily this is an issue we are aware of and I have a quick change to test this morning and if all is good it should end up merged and included in the next release.

---

<div class="post-metadata">

**Author:** ![Tolga\_Kavukcu](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/tolga_kavukcu/32/3328_2.png) [@Tolga\_Kavukcu](https://community.n8n.io/u/Tolga_Kavukcu)\
**Post date:** [September 5, 2022, 9:09am UTC](https://community.n8n.io/t/kafka-trigger-error/17368/6 "2022-09-05T09:09:51Z")

</div>

Thanks @Jon , got it. I will do the research on my side. I will check the new release when it’s available and share my test too.

Cheers!
