Skip to content
This repository was archived by the owner on Jun 12, 2026. It is now read-only.
This repository was archived by the owner on Jun 12, 2026. It is now read-only.

Trying to replicate a message sent through Kafka that has headers leads to an error #5

@lbilger

Description

@lbilger

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:

2021-10-06T08:19:47.923 [Error] Executed 'Functions.copy-all' (Failed, Id=4c649116-0fff-4013-b104-d6f79885b280, Duration=2ms)Serialization operation failed due to unsupported type System.Byte[].

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

  • Create an Event Hubs Namespace and an Event Hub
  • Create a Shared Access Policy with write access
  • Write a message to the Event Hub using kcat, e.g.
    kcat -b "${event_hubs_namespace}.servicebus.windows.net:9093" -X security.protocol=sasl_ssl -X sasl.mechanisms=PLAIN -X sasl.username='$ConnectionString' -X sasl.password="${connection_string}" -t "${event_hub_name}" -H headerkey=headervalue -k key -P <<< value
    
  • follow the instructions in this repository to replicate the Event Hub to another one

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