You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default the transport serializes messages to json format but you might want to use another format such as [Apache Avro](https://avro.apache.org/docs/1.2.0/).
95
+
For that you have to implement Serializer interface and set it to the context, producer or consumer.
96
+
If a serializer set to context it will be injected to all consumers and producers created by the context.
97
+
98
+
```php
99
+
<?php
100
+
use Enqueue\RdKafka\Serializer;
101
+
use Enqueue\RdKafka\RdKafkaMessage;
102
+
103
+
class FooSerializer implements Serializer
104
+
{
105
+
public function toMessage($string) {}
106
+
107
+
public function toString(RdKafkaMessage $message) {}
0 commit comments