question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve compatibility with the Confluent Platform

See original GitHub issue

Currently, Spring Cloud Stream provides a dedicated client for Confluent’s Schema Registry. But because the Avro serializer used by Confluent’s Kafka REST Proxy encodes the Schema-Id into the message payload, messages sent by the REST Proxy are not compatible with SCS’s AvroSchemaRegistryClientMessageConverter.

As decribed in their mailing list, Confluent’s serializer perfaces the actual Avro message with the Id of the message’s Schema in their Schema Registry. Therefore, the MessageConverter would need to extract the Schema-Id before deserializing the actual payload in a way similar to their AbstractKafkaAvroDeserializer:

      ByteBuffer buffer = getByteBuffer(payload);
      id = buffer.getInt();
      String subject = includeSchemaAndVersion ? getSubjectName(topic, isKey) : null;
      Schema schema = schemaRegistry.getBySubjectAndID(subject, id);
      int length = buffer.limit() - 1 - idSize;

While trying to get SCS to work with the Confluent Platform, we already implemented a ConfluentSchemaRegistryClientMessageConverter, but an official implementation would be preferable of course.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:7
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
viniciusccarvalhocommented, Sep 15, 2017

Thank you for your interest, we have this as a feature in the backlog, but just not a priority ATM.

One area of concern is that we also modify the payload to embed headers, and the first byte is reserved for the version of the headerMode. I’m not sure how would allowing reading from confluent’s format could interfere there, unless you always use raw mode for headers.

Right now we are revisiting the entire serialization/contentType story inside the framework, we will be on a better position to support this once 2.0 gets to a stable release. Then we may be able to create a toggle feature for this.

Regards

0reactions
olegzcommented, Sep 11, 2019

Giving that this issue is a bit dated and the fact that schema registry moved to it’s own repo, I am closing it here. However it doesn’t mean the issue os not valid, but perhaps it needs to be refreshed and resubmitted

Read more comments on GitHub >

github_iconTop Results From Across the Web

Supported Versions and Interoperability for Confluent Platform
The Confluent Platform version you want to use is compatible with a currently ... provide better support when you experience issues with Confluent...
Read more >
Upgrade Confluent Platform
In most cases, we recommend you upgrade Confluent Control Center last among the Confluent Platform components. However, if you are upgrading from 6.0.1...
Read more >
Supported Versions and Interoperability | Confluent Platform ...
Each version of Confluent Platform includes several component services which are only compatible in that specific Confluent Platform version.
Read more >
Schema Evolution and Compatibility - Confluent Documentation
The Confluent Schema Registry default compatibility type is BACKWARD , not BACKWARD_TRANSITIVE . The main reason that BACKWARD compatibility mode is the default ......
Read more >
Supported Versions and Interoperability | Confluent Platform ...
Supported Versions and Interoperability¶. This topic provides the supported versions and interoperability of Confluent Platform and its components. Contents.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found