Class BasePulsarConsumerInstrumentation

java.lang.Object
org.apache.skywalking.apm.agent.core.plugin.AbstractClassEnhancePluginDefine
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassEnhancePluginDefine
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine
org.apache.skywalking.apm.plugin.pulsar.common.define.BasePulsarConsumerInstrumentation

public class BasePulsarConsumerInstrumentation extends org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine
The pulsar consumer instrumentation use ConsumerImpl as an enhanced class. Consumer is a user-oriented interface and the implementations are ConsumerImpl and MultiTopicsConsumerImpl

The MultiTopicsConsumerImpl is a complex type with multiple ConsumerImpl to support uses receive messages from multiple topics. As each ConsumerImpl has it's own topic name and it is the initial unit of a single topic to receiving messages, so use ConsumerImpl as an enhanced class is an effective way.

Use messageProcessed as the enhanced method since pulsar consumer has multiple ways to receiving messages such as sync method, async method and listeners. Method messageProcessed is a basic unit of ConsumerImpl, no matter which way uses uses, messageProcessed will always record the message receiving.

  • Field Details

  • Constructor Details

    • BasePulsarConsumerInstrumentation

      public BasePulsarConsumerInstrumentation()
  • Method Details

    • enhanceClass

      protected org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch enhanceClass()
      Specified by:
      enhanceClass in class org.apache.skywalking.apm.agent.core.plugin.AbstractClassEnhancePluginDefine
    • getConstructorsInterceptPoints

      public org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint[] getConstructorsInterceptPoints()
      Specified by:
      getConstructorsInterceptPoints in class org.apache.skywalking.apm.agent.core.plugin.AbstractClassEnhancePluginDefine
    • getInstanceMethodsInterceptPoints

      public org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints()
      Specified by:
      getInstanceMethodsInterceptPoints in class org.apache.skywalking.apm.agent.core.plugin.AbstractClassEnhancePluginDefine