Class 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 decode KafkaNull payloads, returning null. When using a custom MessageHandlerMethodFactory, 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)  
      • Methods inherited from class org.springframework.messaging.handler.annotation.support.PayloadMethodArgumentResolver

        resolveTargetClass, supportsParameter, validate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 interface org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver
        Overrides:
        resolveArgument in class org.springframework.messaging.handler.annotation.support.PayloadMethodArgumentResolver
        Throws:
        java.lang.Exception
      • isEmptyPayload

        protected boolean isEmptyPayload​(java.lang.Object payload)
        Overrides:
        isEmptyPayload in class org.springframework.messaging.handler.annotation.support.PayloadMethodArgumentResolver