Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue 5454][pulsar-client-cpp]Fix cpp client schema version #5930

Merged

Conversation

tuteng
Copy link
Member

@tuteng tuteng commented Dec 24, 2019

Fixes #5454

Motivation

The current CPP client cannot correctly obtain the schema version, resulting in an error in parsing with java client when sending data with schema using python client.

Test code:

import pulsar
import json

from pulsar.schema import *

class Test(Record):
    name = String()
    id = Integer()

client = pulsar.Client('pulsar://localhost:6650');
producer = client.create_producer('test-producer-schema', schema=AvroSchema(Test))
producer.send(Test(name='Hello', id=1))
client.close()

Modifications

  • Add set schema version in msgmetadata

Verifying this change

Add check schema version in unit test SchemaTest

@tuteng tuteng added type/bug The PR fixed a bug or issue reported a bug component/c++ labels Dec 24, 2019
@tuteng tuteng added this to the 2.6.0 milestone Dec 24, 2019
@tuteng tuteng self-assigned this Dec 24, 2019
@tuteng
Copy link
Member Author

tuteng commented Dec 24, 2019

run cpp tests

1 similar comment
@tuteng
Copy link
Member Author

tuteng commented Dec 24, 2019

run cpp tests

@tuteng
Copy link
Member Author

tuteng commented Dec 25, 2019

run cpp tests
run integration tests

@tuteng
Copy link
Member Author

tuteng commented Dec 25, 2019

run cpp tests

@tuteng
Copy link
Member Author

tuteng commented Dec 25, 2019

run cpp tests
run integration tests

@tuteng
Copy link
Member Author

tuteng commented Dec 26, 2019

2019-12-25\T\15:56:03.124 [INFO] Pulsar :: Distribution :: Server ................... FAILURE [ 26.022 s]

run cpp tests

@tuteng
Copy link
Member Author

tuteng commented Dec 26, 2019

run cpp tests

2 similar comments
@tuteng
Copy link
Member Author

tuteng commented Dec 31, 2019

run cpp tests

@tuteng
Copy link
Member Author

tuteng commented Dec 31, 2019

run cpp tests

@sijie sijie merged commit a26f67a into apache:master Jan 1, 2020
@sijie sijie deleted the fix/cpp-client-not-get-schema-version branch January 1, 2020 00:55
@sijie sijie modified the milestones: 2.6.0, 2.5.0 Jan 6, 2020
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this pull request Aug 24, 2020
…5930)

Fixes apache#5454 


### Motivation

The current CPP client cannot correctly obtain the schema version, resulting in an error in parsing with java client when sending data with schema using python client.

Test code:

```
import pulsar
import json

from pulsar.schema import *

class Test(Record):
    name = String()
    id = Integer()

client = pulsar.Client('pulsar://localhost:6650');
producer = client.create_producer('test-producer-schema', schema=AvroSchema(Test))
producer.send(Test(name='Hello', id=1))
client.close()
```



### Modifications

* Add set schema version in msgmetadata

### Verifying this change

Add check schema version in unit test SchemaTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mysql JDBC Sink - consumer error
2 participants