Skip to content

Latest commit

 

History

History
144 lines (79 loc) · 5.76 KB

File metadata and controls

144 lines (79 loc) · 5.76 KB

{pulsar-short} Admin Console

The Admin Console for {pulsar-reg} is a web-based UI from {company} that administers topics, namespaces, sources, sinks, and various aspects of {pulsar} features.

Getting Started in {pulsar-short} Admin Console

In the {pulsar-short} Admin Console, you can use {pulsar-short} clients to send and receive pub/sub messages.

If you installed the Admin console with the {company} {pulsar-short} Helm chart, access the Admin console via the pulsar-adminconsole external load balancer endpoint in your cloud provider:

GCP Pods

Log in with username admin.

If you’re running a server or VM deployment, see Admin Console on Server/VM for instructions on deploying and accessing the Admin console.

{pulsar-short} Admin Console features

To try out your service, use the built-in WebSocket test clients on the {pulsar-short} Admin Console’s Test Clients page.

To see currently available namespaces, go to Namespaces, or select the button in the upper right corner.

Select Namespace

Messages published to namespaces are automatically replicated to all node(s) in the cluster.

{product} Admin Console

For interactive code samples, go to Code Samples.

Sending and receiving {pulsar-short} messages

Go to the {pulsar-short} Admin Console’s Test Clients page. The quickest way to try your service is to use the test clients and send messages from one client to the other.

In the WebSocket Test Client 1 section, click Connect. This action creates a connection from the {pulsar-short} Admin Console that’s running in your browser to the {pulsar-short} instance on your server.

Scroll down to the Consume tab. In this simple example, which verifies that the service is running properly, add a hello world message and click Send. Example:

Send a message using a test client

In doing so, you published a message to your server, and in the Test Client you’re listening to your own topic.

Your client is working with the {pulsar-short} server.

Create new topics and tenants

By default, topics are automatically created when you first publish or subscribe. To manually create a topic or to create a partitioned topic, go to Topics.

The first part of a full topic name is your tenant name, followed by the namespace, and then the topic name, as below:

public/namespace/my-topic

Select your current tenant using the drop-down at the top right of the Topics page.

To create a new tenant, go to Tenants.

To see detailed information about your topics, go to Topics.

Code samples

On the {pulsar-short} Admin Console’s Code Samples page, there are examples for Java, Python, Golang, Node.js, WebSocket, and HTTP clients. Each example shows Producer, Consumer, and Reader code, plus language-specific examples of setting project properties and dependencies. For example, selecting Java will show you how to connect your Java project to {pulsar-short} by modifying your project’s pom.xml file.

Connecting to {pulsar-short}

This section describes how to connect {pulsar-short} components to the Admin console.

Creating and showing credentials

When connecting clients, you’ll need to provide your connect token to identify your account. In the {pulsar-short} APIs, you specify the token when creating the client object. The token is your password to your account, so keep it safe.

The code samples automatically add your client token as part of the source code for convenience. However, a more secure practice would be to read the token from an environment variable or a file.

In the Admin console’s Credentials page, select Create New token and follow the instructions.

If you previously created a token, use the Credentials page to get its value.

Connecting Clients

To connect using the {pulsar-short} binary protocol, use the following URL format with port 6651:

pulsar+ssl://<dns-name>:6651

For example, for an installed node with a DNS name ip-10-101-32-250.srv101.dsinternal.org:

pulsar+ssl://ip-10-101-32-250.srv101.dsinternal.org:6651

Connect with WebSocket API

To connect using the WebSocket API, use the following URL format with port 8001:

wss://<dns-name>:8001

For example:

wss://ip-10-101-32-250.srv101.dsinternal.org:8001

Connect with HTTPS

To connect using HTTP, use the following URL format with port 8085:

For example:

Connect to {pulsar-short} admin API

To connect to the admin API, use the following URL format with port 8443:

For example, give a DNS name of ip-10-101-32-250.srv101.dsinternal.org:

You can list all the tenants like this, for example:

Or if you have authentication enabled, like this:

pulsar-admin --admin-url https://ip-10-101-32-250.srv101.dsinternal.org:8443 \
    --auth-plugin org.apache.pulsar.client.impl.auth.AuthenticationToken \
    --auth-params file:///token.jwt

You can get the token from the {pulsar-short} Admin Console’s Credentials page.

Alternatively, you can save the URL authentication parameters in your client.conf file.

Next steps

For more on building and running a standalone {pulsar-short} Admin console, see the Admin Console on Server/VM or the {pulsar-short} Admin console repo {pulsar-admin-console-repo}#dev[readme].