Package | Description |
---|---|
org.apache.pulsar.client.api | |
org.apache.pulsar.client.internal |
Modifier and Type | Field and Description |
---|---|
static Schema<byte[]> |
Schema.BYTES
Schema that doesn't perform any encoding on the message payloads.
|
static Schema<KeyValue<byte[],byte[]>> |
Schema.KV_BYTES
Schema that can be used to encode/decode KeyValue.
|
static Schema<String> |
Schema.STRING
Schema that can be used to encode/decode messages whose values are String.
|
Modifier and Type | Method and Description |
---|---|
static Schema<GenericRecord> |
Schema.AUTO_CONSUME()
Create a schema instance that automatically deserialize messages
based on the current topic schema.
|
static Schema<byte[]> |
Schema.AUTO_PRODUCE_BYTES()
Create a schema instance that accepts a serialized payload
and validates it against the topic schema.
|
static Schema<GenericRecord> |
Schema.AUTO()
Deprecated.
|
static <T> Schema<T> |
Schema.AVRO(Class<T> clazz)
Create a Avro schema type by extracting the fields of the specified class.
|
static Schema<?> |
Schema.getSchema(SchemaInfo schemaInfo) |
static <T> Schema<T> |
Schema.JSON(Class<T> clazz)
Create a JSON schema type by extracting the fields of the specified class.
|
static <K,V> Schema<KeyValue<K,V>> |
Schema.KeyValue(Class<K> key,
Class<V> value)
Key Value Schema whose underneath key and value schemas are JSONSchema.
|
static <K,V> Schema<KeyValue<K,V>> |
Schema.KeyValue(Class<K> key,
Class<V> value,
SchemaType type)
Key Value Schema using passed in schema type, support JSON and AVRO currently.
|
static <K,V> Schema<KeyValue<K,V>> |
Schema.KeyValue(Schema<K> key,
Schema<V> value)
Key Value Schema using passed in key and value schemas.
|
static <T extends com.google.protobuf.GeneratedMessageV3> |
Schema.PROTOBUF(Class<T> clazz)
Create a Protobuf schema type by extracting the fields of the specified class.
|
Modifier and Type | Method and Description |
---|---|
static <K,V> Schema<KeyValue<K,V>> |
Schema.KeyValue(Schema<K> key,
Schema<V> value)
Key Value Schema using passed in key and value schemas.
|
static <K,V> Schema<KeyValue<K,V>> |
Schema.KeyValue(Schema<K> key,
Schema<V> value)
Key Value Schema using passed in key and value schemas.
|
<T> ConsumerBuilder<T> |
PulsarClient.newConsumer(Schema<T> schema)
Create a consumer builder with a specific schema for subscribing on a specific topic
|
<T> ProducerBuilder<T> |
PulsarClient.newProducer(Schema<T> schema)
Create a producer builder that can be used to configure
and construct a producer with the specified schema
|
<T> ReaderBuilder<T> |
PulsarClient.newReader(Schema<T> schema)
Create a topic reader builder with a specific
Schema ) to read from the specified topic. |
Modifier and Type | Method and Description |
---|---|
static Schema<?> |
DefaultImplementation.getSchema(SchemaInfo schemaInfo) |
static Schema<GenericRecord> |
DefaultImplementation.newAutoConsumeSchema() |
static Schema<byte[]> |
DefaultImplementation.newAutoProduceSchema() |
static <T> Schema<T> |
DefaultImplementation.newAvroSchema(Class<T> clazz) |
static Schema<byte[]> |
DefaultImplementation.newBytesSchema() |
static <T> Schema<T> |
DefaultImplementation.newJSONSchema(Class<T> clazz) |
static <K,V> Schema<KeyValue<K,V>> |
DefaultImplementation.newKeyValueSchema(Class<K> key,
Class<V> value,
SchemaType type) |
static <K,V> Schema<KeyValue<K,V>> |
DefaultImplementation.newKeyValueSchema(Schema<K> keySchema,
Schema<V> valueSchema) |
static <T extends com.google.protobuf.GeneratedMessageV3> |
DefaultImplementation.newProtobufSchema(Class<T> clazz) |
static Schema<String> |
DefaultImplementation.newStringSchema() |
Modifier and Type | Method and Description |
---|---|
static <K,V> Schema<KeyValue<K,V>> |
DefaultImplementation.newKeyValueSchema(Schema<K> keySchema,
Schema<V> valueSchema) |
static <K,V> Schema<KeyValue<K,V>> |
DefaultImplementation.newKeyValueSchema(Schema<K> keySchema,
Schema<V> valueSchema) |
Copyright © 2017–2019 Apache Software Foundation. All rights reserved.