Closed AlessandroMinoccheri closed 1 year ago
Hi, I am trying to configure a consumer in PHP/Symfony of a kafka application. But I got this error:
[Symfony\Component\Messenger\Exception\InvalidArgumentException] No transport supports the given Messenger DSN "kafka://localhost:9092"..
This is my messenger.yaml:
framework: messenger: transports: consumer: dsn: '%env(KAFKA_URL)%' serializer: App\Infrastructure\Messenger\Serializer options: commitAsync: true receiveTimeout: 10000 topic: name: "Users" kafka_conf: enable.auto.offset.store: 'false' group.id: 'my-group-id' # should be unique per consumer max.poll.interval.ms: '45000' topic_conf: auto.offset.reset: 'earliest' routing: App\Domain\Model\Message: consumer
KAFKA_URL is kafka://localhost:9092, I also tried only localhost:9092 without success. Can you help me?
kafka://localhost:9092
localhost:9092
The problem was solved by adding manually:
Koco\Kafka\KocoKafkaBundle::class => ['all' => true],
hello, where ? in messenger factory ?
Hi, I am trying to configure a consumer in PHP/Symfony of a kafka application. But I got this error:
This is my messenger.yaml:
KAFKA_URL is
kafka://localhost:9092
, I also tried onlylocalhost:9092
without success. Can you help me?