Skip to content

Use Pulsar built AVRO serialization on producer/consumer #42

@jacque1ine

Description

@jacque1ine

Try using Avro Maven plugin to generate a POJO which can be used as the parameter when create a producer or consumer of type AVRO.
See previous numagen implementation here: ccebf85

This commit use AUTO CONSUME for consumer, and POJO for producer. If using Schema.AVRO() it requires a POJO to be passed in

This may be helpful:
https://www.baeldung.com/java-apache-avro#read-schema
https://avro.apache.org/docs/1.10.2/gettingstartedjava.html

Currently check is done on client side to allow us to handle SerDe. This is because we wanted a generic approach that wouldn't require us to know the POJO before hand. With the current approach, the topic cannot have a schema enforced.

This issue should be able to handle so that the schema checking is done on the server side.

This doc may be helpful:https://pulsar.apache.org/docs/4.0.x/schema-overview/

Image

Can look here for experiment: #47

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions