Consume
Consume a messages from Pulsar topic(s).
type: "io.kestra.plugin.pulsar.Consume"
Examples
id: pulsar_consume
namespace: company.team
tasks:
- id: consume
type: io.kestra.plugin.pulsar.Consume
uri: pulsar://localhost:26650
topic: test_kestra
deserializer: JSON
subscriptionName: kestra_flow
Properties
deserializer *Requiredstring
STRING
STRING
JSON
BYTES
Deserializer used for the value.
subscriptionName *Requiredstring
The subscription name.
Using subscription name, we will fetch only records that haven't been consumed yet.
topic *Requiredobject
Pulsar topic(s) where to consume messages from.
Can be a string or a list of strings to consume from multiple topics.
uri *Requiredstring
Connection URLs.
You need to specify a Pulsar protocol URL.
- Example of localhost:
pulsar://localhost: 6650
- If you have multiple brokers:
pulsar://localhost: 6650,localhost: 6651,localhost: 6652
- If you use TLS authentication:
pulsar+ssl://pulsar.us-west.example.com: 6651
authenticationToken string
Authentication token.
Authentication token that can be required by some providers such as Clever Cloud.
consumerName string
The consumer name.
consumerProperties object
Add all the properties in the provided map to the consumer.
encryptionKey string
Add a public encryption key to the producer/consumer.
initialPosition string
Earliest
Latest
Earliest
The position of a subscription to the topic.
maxDuration string
duration
The maximum duration waiting for new record.
It's not a hard limit and is evaluated every second.
maxRecords integerstring
The maximum number of records to fetch before stopping.
It's not a hard limit and is evaluated every second.
pollDuration string
PT2S
duration
Duration waiting for record to be polled.
If no records are available, the maximum wait to wait for a new record.
schemaString string
JSON string of the topic's schema
Required for connecting with topics with a defined schema and strict schema checking
schemaType string
NONE
NONE
AVRO
JSON
The schema type of the topic
Can be one of NONE, AVRO or JSON. None means there will be no schema enforced.
subscriptionType string
Exclusive
Exclusive
Shared
Failover
Key_Shared
The subscription type.
tlsOptions Non-dynamicAbstractPulsarConnection-TlsOptions
TLS authentication options.
You need to use "pulsar+ssl://" in serviceUrl to enable TLS support.
Outputs
messagesCount integer
Number of messages consumed.
uri string
uri
URI of a Kestra internal storage file containing the consumed messages.
Definitions
io.kestra.plugin.pulsar.AbstractPulsarConnection-TlsOptions
ca string
The ca certificate.
Must be a base64-encoded pem file.
cert string
The client certificate.
Must be a base64-encoded pem file.
key string
The key certificate.
Must be a base64-encoded pem file.