Class OnapMsgRouterBatchPublisher.Builder

    • Constructor Detail

      • Builder

        public Builder()
        Construct a batch publisher builder.
    • Method Detail

      • logTo

        public OnapMsgRouterBatchPublisher.Builder logTo​(org.slf4j.Logger log)
        Specify the log to use. If never called, the default logger, named for this class, is used.
        Parameters:
        log - the slf4j logger to use for this library. Do not pass null.
        Returns:
        this builder
      • batchAtMost

        public OnapMsgRouterBatchPublisher.Builder batchAtMost​(int atMost)
        specify how many messages to hold for a batch
        Parameters:
        atMost - the limit on the number of messages to batch before sending
        Returns:
        this
      • batchMaxAgeMs

        public OnapMsgRouterBatchPublisher.Builder batchMaxAgeMs​(int maxAgeMs)
        specify how long to wait for messages to join a batch
        Parameters:
        maxAgeMs - the limit, in milliseconds, on how long to wait before sending a batch
        Returns:
        this
      • retryAfterMs

        public OnapMsgRouterBatchPublisher.Builder retryAfterMs​(int retryWaitMs)
        specify how long to wait before retrying when the MR call results in an error
        Parameters:
        retryWaitMs - the time, in millis, to wait before retrying a failed batch send
        Returns:
        this