Skip to main content
Let’s create the producer application by pasting the following Go code into a file named producer.go.
Fill in the appropriate <Broker Service URL> endpoint and <API KEY> in the URL and Authentication properties where the producer is instantiated using the pulsar.NewClient method. Compile the producer with the following:
If you get any errors during the build make sure that you initialized the module correctly per the instructions in the previous step.