Class OnapMsgRouterPublisher

java.lang.Object
io.continual.onap.services.publisher.OnapMsgRouterPublisher

public class OnapMsgRouterPublisher extends Object
A simple message router publisher. This class issues HTTP transactions that execute in the foreground to push messages to the ONAP Message Router service. This class is intended to be used concurrently.
  • Field Details

  • Method Details

    • localTest

      public static OnapMsgRouterPublisher.Builder localTest()
      Get a local test publisher builder to optionally customize further. By default, the publisher will run against http://localhost:3904, publishing to TEST-TOPIC.
      Returns:
      a builder
    • builder

      public static OnapMsgRouterPublisher.Builder builder()
      Get a new builder
      Returns:
      a builder
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • send

      Send a single message to the MR cluster.
      Parameters:
      msg - the message to post
      Returns:
      the HTTP status code from MR
    • send

      Send a set of messages to the MR cluster in an all or nothing attempt. Each host in the host list will be attempted at most once.
      Parameters:
      msgList - a list of messages
      Returns:
      the HTTP status code from MR