public class RESTSubscriber extends BufferingSubscriber
maxUncommittedMessages, receivedMessages, uncommittedMessages
Constructor and Description |
---|
RESTSubscriber(int maxUncommittedMessages,
List<String> urls,
org.apache.http.impl.client.CloseableHttpClient client,
long minWait,
int connectTimeout)
Create a RESTSubscriber.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
List<PubSubMessage> |
getMessages()
Implement this method to read and return a
List of PubSubMessage from your actual PubSub source. |
commit, fail, haveMessages, receive
public RESTSubscriber(int maxUncommittedMessages, List<String> urls, org.apache.http.impl.client.CloseableHttpClient client, long minWait, int connectTimeout)
maxUncommittedMessages
- The maximum number of records that will be buffered before commit() must be called.urls
- The URLs which will be used to make the http request.client
- The client to use to make http requests.minWait
- The minimum time (ms) to wait between subsequent http requests.connectTimeout
- The minimum time (ms) to wait for a connection to be made.public List<PubSubMessage> getMessages()
BufferingSubscriber
List
of PubSubMessage
from your actual PubSub source.getMessages
in class BufferingSubscriber
List
of PubSubMessage
if any were read. A null or an empty list if not.public void close()
Copyright © 2021. All rights reserved.