# Pulsar

## Pulsar Connection

### **Description**

The "Pulsar" connection type is used to connect a flow/agent to an external Pulsar messaging broker to either send or receive messages.

NOTE: If you are using Pulsar through the Kafka Over Pulsar (KOP) protocol, then you should configure a Kafka connection instead of a Pulsar connection.

### **Configuration Properties**

* **Service URL:** The URL of the Pulsar broker.
* **Topic Template:** A template that contains the full topic-name structure, into which the topicName provided by the flow will be added:
  * For example: myenv.myapplication.${topicName}
  * The flow provides a topic name in the kafka node configuration (e.g. mytopic), and the resulting fully qualified topic name is: myenv.myapplication.mytopic
* **Auth Mode:** The authentication mode for the connection, either "oauth" or "bearer".
  1. **OAuth:** A client credentials connection. You must provide the typical client credentials configuration in subsequent fields.
  2. **Bearer:** A simple bearer token.
* **Client Credentials** (if selected as Auth mode):
  * **Auth Endpoint**: The auth URL to obtain the token.
  * **Client ID:** The client Id for the client application
  * **Client Secret**: The secret key for the client application.
  * **Audience**: Specifies the intended recipients of the token.
  * **Scope**: Defines the level of access and permissions the token grants.
  * **Content Type:** Indicates the data formatting required by the connection server. Currently supported formats are:
    * application/json
    * xxx-www-form-encoded
* **Environment Variables**: Additional environment variables can be added and used in the topic template.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.contextual.io/documentation-and-resources/components-and-data/connections/types-of-connections/pulsar.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
