Skip to content

Pulsar Admin Go. Feel free to open an issue if you have any questions or feature requests.

License

Notifications You must be signed in to change notification settings

protocol-laboratory/pulsar-admin-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pulsar-admin-go

This project is a Go client library for the Apache Pulsar Admin API.

Requirements

  • Go 1.18+

usage

package main

import (
	"fmt"
	"github.com/protocol-laboratory/pulsar-admin-go/padmin"
)

func main() {
	admin, err := padmin.NewDefaultPulsarAdmin()
	if err != nil {
		panic(err)
	}
	// get namespace topic list
	topics, err := admin.PersistentTopics.ListNamespaceTopics("tenant", "namespace")
	if err != nil {
		panic(err)
	}
	fmt.Println(topics)
}

how to set up the pulsar broker in unit-tests

The testcases will automatically start a pulsar broker in the background using testcontainers.
Also by detect if pulsar broker is already running, the testcases will use the existing broker. That means you can use the already exists local pulsar broker for the testcases.
You can start a pulsar broker using commands below:

docker run -it --rm -p 6650:6650 -p 8080:8080 apachepulsar/pulsar:latest /pulsar/bin/pulsar-daemon start standalone --no-functions-worker --no-stream-storage

About

Pulsar Admin Go. Feel free to open an issue if you have any questions or feature requests.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages