Skip to main content
Create a directory for the Java files in this project:
Let’s create the Java producer application by pasting the following code into a file src/main/java/io/streamnative/developer/ProducerExample.java.
Fill in the appropriate <BOOTSTRAP SERVERS> endpoint and <API KEY> in the BOOTSTRAP_SERVERS_CONFIG and SASL_JAAS_CONFIG properties where the client configuration props object is created. You can test the syntax before proceding by running the following command:
And you should see the following output: