Interface MessageGroupingFunction


  • public interface MessageGroupingFunction
    Function to group messages that will be processed by the same instance of concurrent message handler.
    • Method Detail

      • resolveProcessingGroup

        int resolveProcessingGroup​(org.apache.pulsar.client.api.Message<?> message,
                                   int numberOfGroups)
        Resolves a processing group for a message. This is used for implementing key-ordered message processing with ReactiveMessagePipelineBuilder.ConcurrentOneByOneMessagePipelineBuilder
        Parameters:
        message - the Pulsar message
        numberOfGroups - maximum number of groups
        Returns:
        processing group for the message, in the range of 0 to numberOfGroups, exclusive