title: Producing avro message using php-enqueue
body: <p>I'm researching a way of producing avro messages from php to kafka using <a href="https://github.com/php-enqueue/enqueue-dev" rel="nofollow noreferrer">php-enqueue</a>.</p>
  <p>Their <a href="https://php-enqueue.github.io/transport/kafka/" rel="nofollow noreferrer">documentation</a>  states that you can use other formats, including Apache Avro.</p>
  <blockquote>
  <p>By default the transport serializes messages to json format but you
  might want to use another format such as Apache Avro. For that you
  have to implement Serializer interface and set it to the context,
  producer or consumer. If a serializer set to context it will be
  injected to all consumers and producers created by the context.</p>
  <pre><code>&lt;?php
  use Enqueue\RdKafka\Serializer;
  use Enqueue\RdKafka\RdKafkaMessage;
  
  class FooSerializer implements Serializer
  {
      public function toMessage($string) {}
  
      public function toString(RdKafkaMessage $message) {}
  }
  
  /** @var \Enqueue\RdKafka\RdKafkaContext $context */
  
  $context-&gt;setSerializer(new FooSerializer());
  </code></pre>
  </blockquote>
  <p>The serializer in the example is converting to and from strings. Avro format is binary as far as I understand, so how is a custom serializer supposed to work in this case?</p>