.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
+.. _apex-user-manual-label:
APEX User Manual
****************
APEX provides plugins for each of the main areas.
-Configure AVRO Schema Handler
-#############################
+Configure Context Schema Handler
+################################
.. container:: paragraph
+ There are 2 choices available for defining schema: JSON & AVRO.
+ JSON based schemas are recommended because of the flexibility, better tooling & easier integration.
+
+ The JSON schema handler is added to the configuration as
+ follows:
+
+ .. container:: listingblock
+
+ .. container:: content
+
+ .. code::
+
+ "engineServiceParameters":{
+ "engineParameters":{
+ "contextParameters":{
+ "parameterClassName" : "org.onap.policy.apex.context.parameters.ContextParameters",
+ "schemaParameters":{
+ "Json":{
+ "parameterClassName" :
+ "org.onap.policy.apex.plugins.context.schema.json.JsonSchemaHelperParameters"
+ }
+ }
+ }
+ }
+ }
+
The AVRO schema handler is added to the configuration as
follows:
Kindly note that the above Kafka properties is just a reference,
and the actual properties required depends on the Kafka server installation.
+ In cases where the message produced in Kafka topic has been serialized using KafkaAvroSerializer,
+ then the following parameters needs to be additionally added to `KafkaProperties` for the consumer
+ to have the capability of deserializing the message properly while consuming.
+
+ .. container:: listingblock
+
+ .. container:: content
+
+ .. code::
+
+ [
+ "value.deserializer",
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer"
+ ],
+ [
+ "schema.registry.url",
+ "<url of the schema registry configured in Kafka cluster for registering Avro schemas>"
+ ]
+
+ .. container:: paragraph
+
+ For more details on how to setup schema registry for Kafka cluster,
+ kindly take a look `here <https://github.com/confluentinc/schema-registry/blob/master/README.md>`__.
+
+
Kafka Output
============
.. container:: paragraph