/sample-pulsar-go-client

A sample Pulsar Golang client

Primary LanguageGoApache License 2.0Apache-2.0

Pulsar Go Sample Client

The sample is based on the Pulsar Go client library's reference implmentation.

Set up

Install the library package.

$ go get -u github.com/apache/pulsar/pulsar-client-go/pulsar

Replace correct pulsar URL, token and topic name in both consumer.go and producer.go files.

Start consumer

$ cd src
$ go run consumer.go

Start producer

$ go run producer.go