Annotation Interface PulsarMessage
Specifies default topic and schema info for a message class.
When a message class is marked with this annotation, the topic/schema resolution process will use the specified information to determine a topic/schema to use for the message in process.
- Author:
- Aleksei Arsenev, Chris Bono
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<?>The message key type when schema type is set toKEY_VALUE.org.apache.pulsar.common.schema.SchemaTypeThe default schema type to use for the value schema whenschemaType()is set toKEY_VALUE.org.apache.pulsar.common.schema.SchemaTypeDefault schema type to use for the annotated message class.Default topic for the annotated message class.
-
Element Details
-
topic
String topicDefault topic for the annotated message class.- Returns:
- default topic for the annotated message class or empty string to indicate no default topic is specified
- Default:
- ""
-
schemaType
org.apache.pulsar.common.schema.SchemaType schemaTypeDefault schema type to use for the annotated message class.Note that when this is set to
KEY_VALUEyou must specify the actual key and value information via themessageKeyType()andmessageValueSchemaType()attributes, respectively.- Returns:
- schema type to use for the annotated message class or
NONEto indicate no default schema is specified
- Default:
- NONE
-
messageKeyType
Class<?> messageKeyTypeThe message key type when schema type is set toKEY_VALUE.When the
schemaType()is not set toKEY_VALUEthis attribute is ignored.- Returns:
- message key type when using
KEY_VALUEschema type
- Default:
- java.lang.Void.class
-
messageValueSchemaType
org.apache.pulsar.common.schema.SchemaType messageValueSchemaTypeThe default schema type to use for the value schema whenschemaType()is set toKEY_VALUE.When the
schemaType()is not set toKEY_VALUEthis attribute is ignored and the default schema type must be specified via theschemaTypeattribute.- Returns:
- message value schema type when using
KEY_VALUEschema type
- Default:
- NONE
-