Class CursorManagementFunction

  • All Implemented Interfaces:
    org.apache.pulsar.functions.api.Function<java.lang.String,​java.lang.String>

    public class CursorManagementFunction
    extends java.lang.Object
    implements org.apache.pulsar.functions.api.Function<java.lang.String,​java.lang.String>
    A function that demonstrates how to use pulsar admin client exposed from Function Context. In this particular example, for every input message, the function do reset cursor of current function's subscription to a specified timestamp.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String process​(java.lang.String input, org.apache.pulsar.functions.api.Context context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CursorManagementFunction

        public CursorManagementFunction()
    • Method Detail

      • process

        public java.lang.String process​(java.lang.String input,
                                        org.apache.pulsar.functions.api.Context context)
                                 throws java.lang.Exception
        Specified by:
        process in interface org.apache.pulsar.functions.api.Function<java.lang.String,​java.lang.String>
        Throws:
        java.lang.Exception