Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Topic logs not present in metadata after 60000 ms. #114

Open
1164461842 opened this issue Mar 3, 2022 · 0 comments
Open

Topic logs not present in metadata after 60000 ms. #114

1164461842 opened this issue Mar 3, 2022 · 0 comments

Comments

@1164461842
Copy link

error

10:34:29.761 [main] DEBUG o.a.k.clients.producer.KafkaProducer - [Producer clientId=producer-1] Exception occurred during message send: org.apache.kafka.common.errors.TimeoutException: Topic logs not present in metadata after 60000 ms.

logback.xml

<configuration>

    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>


    <!-- This is the kafkaAppender -->
    <appender name="kafkaAppender" class="com.github.danielwegener.logback.kafka.KafkaAppender">
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
        <topic>logs</topic>
        <keyingStrategy class="com.github.danielwegener.logback.kafka.keying.NoKeyKeyingStrategy" />
        <deliveryStrategy class="com.github.danielwegener.logback.kafka.delivery.AsynchronousDeliveryStrategy" />
        <!-- Optional parameter to use a fixed partition -->
        <partition>0</partition>
        <!-- Optional parameter to include log timestamps into the kafka message -->
         <appendTimestamp>true</appendTimestamp>
        <!-- each <producerConfig> translates to regular kafka-client config (format: key=value) -->
        <!-- producer configs are documented here: https://kafka.apache.org/documentation.html#newproducerconfigs -->
        <!-- bootstrap.servers is the only mandatory producerConfig -->
        <producerConfig>bootstrap.servers=192.168.0.127:9092</producerConfig>
        <!-- this is the fallback appender if kafka is not available. -->
        <appender-ref ref="STDOUT" />
    </appender>

    <root level="debug">
        <appender-ref ref="kafkaAppender" />
        <appender-ref ref="STDOUT" />
    </root>

</configuration>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant