Class KafkaNullAwarePayloadArgumentResolver
- java.lang.Object
-
- org.springframework.messaging.handler.annotation.support.PayloadMethodArgumentResolver
-
- org.springframework.kafka.annotation.KafkaNullAwarePayloadArgumentResolver
-
- All Implemented Interfaces:
org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver
public class KafkaNullAwarePayloadArgumentResolver extends org.springframework.messaging.handler.annotation.support.PayloadMethodArgumentResolver
PayloadMethodArgumentResolver
that can properly decodeKafkaNull
payloads, returningnull
. When using a customMessageHandlerMethodFactory
, add this resolver if you need to handle tombstone records with null values.- Since:
- 2.7.4
- Author:
- Gary Russell
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isEmptyPayload(java.lang.Object payload)
java.lang.Object
resolveArgument(org.springframework.core.MethodParameter parameter, org.springframework.messaging.Message<?> message)
-
-
-
Method Detail
-
resolveArgument
public java.lang.Object resolveArgument(org.springframework.core.MethodParameter parameter, org.springframework.messaging.Message<?> message) throws java.lang.Exception
- Specified by:
resolveArgument
in interfaceorg.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver
- Overrides:
resolveArgument
in classorg.springframework.messaging.handler.annotation.support.PayloadMethodArgumentResolver
- Throws:
java.lang.Exception
-
isEmptyPayload
protected boolean isEmptyPayload(java.lang.Object payload)
- Overrides:
isEmptyPayload
in classorg.springframework.messaging.handler.annotation.support.PayloadMethodArgumentResolver
-
-