-
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 "Key File"
icon to download the private-key file.
-
<private-key>
- fully qualified path to the downloaded file prefixed w/"file://"
(eg.file:///Users/foo/Downloads/o-q1234-abc-user1.json
)
Navigate to "Clients" in the Stream Native UI and then select the "Clients"
tab in the navbar.
-
<issuer-url>
- get from the code snippet for"Java Client By Oauth2"
(eg.https://auth.streamnative.cloud/
) -
<audience>
- the code snippet for"Java Client By Oauth2"
(eg.urn:sn:pulsar:foo-org:foo-instance
)
Add the following to your application.yml (or other property source):
spring:
pulsar:
client:
auth-plugin-class-name: org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2
authentication:
issuer-url: <issuer-url>
private-key: <private-key>
audience: <audience>
service-url: <service-url>
administration:
auth-plugin-class-name: org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2
authentication:
issuer-url: <issuer-url>
private-key: <private-key>
audience: <audience>
service-url: <admin service-url>