public class BasePulsarConsumerInstrumentation extends ClassInstanceMethodsEnhancePluginDefine
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.
| Modifier and Type | Field and Description |
|---|---|
static String |
CONSTRUCTOR_INTERCEPT_TYPE |
static String |
CONSTRUCTOR_INTERCEPTOR_CLASS |
static String |
ENHANCE_CLASS |
static String |
ENHANCE_METHOD |
static String |
ENHANCE_METHOD_TYPE |
static String |
INTERCEPTOR_CLASS |
CONTEXT_ATTR_NAME| Constructor and Description |
|---|
BasePulsarConsumerInstrumentation() |
| Modifier and Type | Method and Description |
|---|---|
protected ClassMatch |
enhanceClass() |
ConstructorInterceptPoint[] |
getConstructorsInterceptPoints() |
InstanceMethodsInterceptPoint[] |
getInstanceMethodsInterceptPoints() |
getStaticMethodsInterceptPointsenhanceClass, enhanceInstance, getInstanceMethodsInterceptV2Points, getStaticMethodsInterceptV2Pointsdefine, enhance, isBootstrapInstrumentation, witnessClasses, witnessMethodspublic static final String CONSTRUCTOR_INTERCEPT_TYPE
public static final String CONSTRUCTOR_INTERCEPTOR_CLASS
public static final String INTERCEPTOR_CLASS
public static final String ENHANCE_METHOD
public static final String ENHANCE_METHOD_TYPE
public static final String ENHANCE_CLASS
protected ClassMatch enhanceClass()
enhanceClass in class AbstractClassEnhancePluginDefinepublic ConstructorInterceptPoint[] getConstructorsInterceptPoints()
getConstructorsInterceptPoints in class AbstractClassEnhancePluginDefinepublic InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints()
getInstanceMethodsInterceptPoints in class AbstractClassEnhancePluginDefineCopyright © 2023 The Apache Software Foundation. All rights reserved.