KonstantinCodes / messenger-kafka

Simple Kafka transport for Symfony Messenger.
MIT License
84 stars 35 forks source link

Commit fail, Broker: Unknown member #28

Closed Kelthan closed 3 years ago

Kelthan commented 3 years ago

Hi, With the new release 0.12 we encountered the following exception with our consumer:

INFO      [app] Offset topic=messages partition=0 offset=2 to be committed asynchronously.
%4|1606832093.118|COMMITFAIL|rdkafka#consumer-10| [thrd:main]: Offset commit (manual) failed for 1/1 partition(s): Broker: Unknown member: messages[0]@3(Broker: Unknown member)

With the v0.11 we didn't have any problems, our consumer configuration was not changed and look like this:

   messages_consumer:
        dsn: '%env(KAFKA_DSN_CONSUMER)%'
        serializer: messenger.transport.symfony_serializer
        options:
          commitAsync: true
          receiveTimeout: 10000
          topic:
            name: 'messages'
          kafka_conf:
            enable.auto.offset.store: 'false'
            group.id: 'messages-consumer'
          topic_conf:
            auto.offset.reset: 'earliest'
        retry_strategy:
          max_retries: 0

Any idea of what may cause the problem ?

Thank you :)

Kelthan commented 3 years ago

I found what cause the problem, there is a bad assignment here : https://github.com/KonstantinCodes/messenger-kafka/blob/master/src/Messenger/KafkaTransport.php#L82 KafkaReceiver is assign to sender.

KonstantinCodes commented 3 years ago

Dude, Thank you so much!

KonstantinCodes commented 3 years ago

Published the fix with a new tag here: https://github.com/KonstantinCodes/messenger-kafka/releases/tag/v0.13