Hi Pradyumna,

It's possible. Here are some points:
1. kafka.Kafka is the class you want to run.
2. As the parameter, pass the path to your server.properties, i.e. the config 
file.
3. Point to the logger config as the VM properties: 
-Dlog4j.configuration=file:/path/to/log4j.properties.
4. You need to add the logger implementation to the classpath. Idea has various 
ways to do this (project structure, run configuration). Also, as a quick hack 
you can modify testImplementation -> implementation on this line 
https://github.com/apache/kafka/blob/1b0edf4f8c42bba17e974038c0bc57b798d0452e/build.gradle#L877

Best,
Ivan

On Thu, Oct 24, 2024, at 11:08, Mickael Maison wrote:
> Hi,
> 
> You can also import the Kafka project as a Gradle project in IntelliJ,
> and then create an Application Run Configuration to run/debug it.
> In your run configuration, set the module classpath to
> kafka.core.main, the main class to kafka.Kafka, and the program
> arguments to one of the server.properties files under config. Then you
> can start a broker directly from within IntelliJ.
> 
> Thanks,
> Mickael
> 
> On Thu, Oct 24, 2024 at 8:48 AM Pradyumna K <kpachar...@gmail.com> wrote:
> >
> > Thank you.
> >
> > Looks like I too accidentally discovered this approach minutes before your
> > reply.
> >
> > I wasn't aware of the DEBUG_SUSPEND_FLAG though. It is useful.
> >
> > Regards
> > Pradyumna
> 

Reply via email to