MCPcopy Create free account
hub / github.com/decodableco/examples / App

Class App

pulsar/java/app/src/main/java/pulsar/App.java:13–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12
13public class App {
14 public String getGreeting() {
15 return null;
16 }
17
18 public static void main(String[] args) throws Exception {
19 System.out.println(new App().getGreeting());
20
21 String issuerUrl = "https://auth.streamnative.cloud/";
22 String credentialsUrl = "file://YOUR-KEY-FILE-PATH";
23 String audience = "urn:sn:pulsar:o-whe2d:free";
24
25 PulsarClient client = PulsarClient.builder()
26 .serviceUrl("")
27 .authentication(
28 AuthenticationFactoryOAuth2.clientCredentials(new URL(issuerUrl), new URL(credentialsUrl), audience))
29 .build();
30
31 Producer producer = client.newProducer().create();
32
33 client.close();
34 }
35}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected