Skip to content

Latest commit

 

History

History
executable file
·
39 lines (28 loc) · 1.23 KB

README.md

File metadata and controls

executable file
·
39 lines (28 loc) · 1.23 KB

Spring Pulsar Integration Example

This is an example application demonstrating how to use Spring for Apache Pulsar.

Prerequisites

If you are using StreamNative Cloud you need to configure your Pulsar service URLs and authentication in the application.yaml file as detailed below:

spring:
  pulsar:
    client:
      service-url: pulsar+ssl://free.o-j8r1u.snio.cloud:6651
      auth-plugin-class-name: org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2
      authentication:
        private-key: file:///Users/user/Downloads/o-j8r1u-free.json
        audience: urn:sn:pulsar:o-j8r1u:free
        issuer-url: https://auth.streamnative.cloud/

Build the example

You can build the example application with the following command:

mvn clean install

Run the example

You can run the example application with the following command:

mvn spring-boot:run