public interface MessagingProvider
| Modifier and Type | Method and Description |
|---|---|
void |
assertTopic(String topic)
Validate that a topic is suitably set up for the messaging implementation
|
String |
assignTo(long offset)
Create assign String to feed into poller based on a given offset.
|
String |
assignTo(Reset reset,
long relativeOffset)
Get assign String to feed into createPoller based on either earliest or latest and a relative offset.
|
default Closeable |
createPoller(String topicName,
Reset reset,
HandlerAdapter<?>... adapters) |
Closeable |
createPoller(String topicName,
Reset reset,
String assign,
HandlerAdapter<?>... adapters)
Create a poller which listens to a topic and starts at a given reset or assigned offset.
|
<T> MessageSender<T> |
createSender(String topic)
Create sender for a specific topic
|
URI |
getServerUri()
Return the uri of the messaging system backend.
|
long |
retrieveOffset(String topicName,
Reset reset)
Retrieve earliest or latest offset for a topic
|
<T> MessageSender<T> createSender(String topic)
T - type of the messagetopic - topic namedefault Closeable createPoller(String topicName, Reset reset, HandlerAdapter<?>... adapters)
Closeable createPoller(String topicName, Reset reset, String assign, HandlerAdapter<?>... adapters)
topicName - name of the topicreset - fallback in case no assign is given or the assigned offset not validassign - opaque implementation dependent assign string (can be null)adapters - list of listener adaptersvoid assertTopic(String topic) throws MessagingException
topic - topic nameMessagingException - exception in case the topic is not suitablelong retrieveOffset(String topicName, Reset reset)
topicName - name of the topicreset - latest or earliestString assignTo(long offset)
offset - String assignTo(Reset reset, long relativeOffset)
reset - reference pointrelativeOffset - relative offsetURI getServerUri()
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.