-
Notifications
You must be signed in to change notification settings - Fork 58
Stream Native Cloud
Follow these steps to use a Pulsar service hosted in the StreamNative Cloud.
Follow the Stream Native Quickstart to create a cloud instance.
Navigate to "Pulsar Clusters" in the Stream Native UI.
-
<service-url>
- copy"Broker Service URL (TLS)"
(eg.pulsar+ssl://foo.streamnative.g.snio.cloud:6651
) -
<admin service-url>
- copy"HTTP Service URL (TLS)"
(eg.https://foo.streamnative.g.snio.cloud
)
Navigate to "Service Accounts" in the Stream Native UI and find the row of the account you will use to connect to the cluster with.
Click the "Generate New Token"
button to generate an authentication token.
-
<token>
- click the "Copy" icon next to the "Expires In 7 Days" label to copy the token.
Add the following to your application.yml (or other property source):
spring:
pulsar:
client:
auth-plugin-class-name: org.apache.pulsar.client.impl.auth.AuthenticationToken
authentication:
token: <token>
service-url: <service-url>
administration:
auth-plugin-class-name: org.apache.pulsar.client.impl.auth.AuthenticationToken
authentication:
token: <token>
service-url: <admin service-url>
Launch your application and you should be on your way to Happy Streaming!
Tip
|
If you encounter errors on application startup with status 401 it is likely the account you are connecting with does not have access to the tenant/namespace your topic is in. Try fully-qualifying your topic names such as persistent://my-tenant/my-namespace/my-topic and be sure your account has access to the topic(s).
|