-
Notifications
You must be signed in to change notification settings - Fork 11
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
Trying to replicate a message sent through Kafka that has headers leads to an error #5
Comments
@clemensv: Do we have any guidance for transforming an event published with Kafka into a form that the native Event Hubs SDKs would produce? Would this potentially be a corner case to consider for other replication tools as well? |
I just hit this same issue and stumbled on this issue by coincidence. Is this due to an issue in the replication libary this repo provides or a gap with the Event Hubs SDK? Would I be better off leveraging a more native kafka solution? |
I think it's a problem with the SDK, I got the same error when I tried to create my own Azure Function to copy the data. I think the reason is the different way headers are serialized in AMQP vs. Kafka, as explained in the Microsoft docs. |
This is something that the replication tasks would be responsible for addressing. Depending on where the exception is occurring, replication may be able to work around it by accessing the raw AMQP message or may need to fallback to using a Kafka-aware client for these scenarios. The Event Hubs SDK is AMQP-based and does not support other protocols or formats, by design. Events are expected to conform to AMQP message specification and transformed with that constraint. It does allow access to the raw AMQP message and data can be exchanged in that format without working directly with the model attributes, which bypasses some of the transforms. Any chance that you're willing to share a full stack trace for the exception and/or offer more detail about what behavior you're observing in the Function? That would help to understand what work arounds may be possible to help get you folks unblocked in the interim. |
If I use this library (I tried
functions/config/EventHubCopy
but I believe it's a general problem) to replicate an Event Hub where messages come in through Kafka and those messages have headers, I get the following error message:This is probably due to the different encoding of headers / application properties in Kafka vs. AMQP, but still it should be possible to copy the message unchanged without any serialization / deserialization required.
There has already been some discussion on this with @jsquire in my StackOverflow question
Steps to reproduce
kcat
, e.g.The text was updated successfully, but these errors were encountered: