Skip to content

kafka consumer start error #4865

@amwyyyy

Description

@amwyyyy

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • [ x ] Bug
  • Requirement
  • Feature or performance improvement

Bug

version:
SkyWalking7.0.0
spring-kafka:2.2.8.RELEASE
kafka-clients:2.0.1

When kafka consumer uses topicPattern, the agent will report an error.

@KafkaListener(topicPattern = KAFKA_TOPIC_NAME)
public void onDemoMessage(ConsumerRecord<String, String> record) {
// ...
}

skywalking-api.log

ERROR 2020-06-05 17:57:30:137 restartedMain InstMethodsInter : class[class org.apache.kafka.clients.consumer.KafkaConsumer] before method[subscribe] intercept failure 
java.lang.ClassCastException: java.util.regex.Pattern cannot be cast to java.util.Collection
	at org.apache.skywalking.apm.plugin.kafka.SubscribeMethodInterceptor.beforeMethod(SubscribeMethodInterceptor.java:33)
	at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:76)
	at org.apache.kafka.clients.consumer.KafkaConsumer.subscribe(KafkaConsumer.java)
	at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.subscribeOrAssignTopics(KafkaMessageListenerContainer.java:584)

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentLanguage agent related.enhancementEnhancement on performance or codesgood first issueGood first issue for beginnerspluginPlugin for agent or collector. Be used to extend the capabilities of default implementor.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions