1

I use embedded-kafka and I have some problems of stable work of it, reflected in: Connection to node 0 (localhost/127.0.0.1:6001) could not be established. Broker may not be available. and timeouts.

I think that increase of memory can help, but I can't find any property for that. I tried to search code for memory or RAM words, but no luck. Is it possible to increase RAM for embedded-kafka?

wind
  • 892
  • 1
  • 11
  • 27
  • It's embedded in your own code, it should not fork another process... You could also try using test containers, which do have external processes – OneCricketeer Dec 24 '19 at 14:00

1 Answers1

0

There may be other issues also for this error, check the port and server properties.
I think you should increase the heap size of java process. which starts the embedded kafka.

Amol
  • 29
  • 3
  • The embedded kafka starts as a new process with `-Xmx1G` and the question is how to change it from the Java API of tests or from maven pom. – wind Dec 24 '19 at 07:18
  • This answer does not answer the question. Take a look here: [_How do I write a good answer?_](https://stackoverflow.com/help/how-to-answer) – Kaan Dec 24 '19 at 23:08