Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 1.74 KB

README.md

File metadata and controls

28 lines (18 loc) · 1.74 KB

Description

This project contains unit tests to reproduce the issue with handling null values produced to Apache Pulsar topic that should represent tombstones (deletions of entities).

BUG #4804 described the issue and enhancement #7139 solved it.

The solution included a nullValue flag inside message metadata used by MessageIml to indicate the presence of a null value in the message to avoid calling Avro parsing code and directly return null when calling Message.getValue().

New BUG#7407 was reported to track the new issue. Solution PR#7408 was provided, but it only fixes sending tombstones when message value is explicitly set to null.

Solution however does not work for two reasons:

  • When trying to read a message with null value a NullPointerException is thrown in other part of the code (now working with versions >= 2.7.0)
  • It should not be required to explicitly indicate a null value to producer (only-key values should work just just fine). Exception thrown when working with implicit null value messages is EOFException in this case

Run the tests

An Apache Pulsar instance must be running locally. If Docker Compose is installed on your computer (on Windows/Mac Docker Desktop will do) you can use provided docker-comopose.yml file:

$ cd src/test/resources
$ docker-compose up -d

To run the tests you can use your IDE or Maven from command line:

$ mvn test