Class OnapMsgRouterPublisher
java.lang.Object
io.continual.onap.services.publisher.OnapMsgRouterPublisher
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for the publisher.static classA message includes an event stream name and a payload -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Get a new builderGet a local test publisher builder to optionally customize further.Send a single message to the MR cluster.send(List<OnapMsgRouterPublisher.Message> msgList) Send a set of messages to the MR cluster in an all or nothing attempt.toString()
-
Field Details
-
kPreferredDateFormat
- See Also:
-
-
Method Details
-
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
Get a new builder- Returns:
- a builder
-
toString
-
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
-