public interface MQTailer<M extends Externalizable> extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
Collection<MQPartition> |
assignments()
Returns the list of MQueue name/partition tuples currently assigned to this tailer.
|
boolean |
closed()
Returns
true if the tailer has been closed. |
void |
commit()
Commit current positions for all partitions (last message offset returned by read).
|
MQOffset |
commit(MQPartition partition)
Commit current position for the partition.
|
String |
group()
Returns the consumer group.
|
MQRecord<M> |
read(Duration timeout)
Read a message from assigned partitions within the timeout.
|
void |
toEnd()
Set the current positions to the end of all partitions.
|
void |
toLastCommitted()
Set the current positions to previously committed positions.
|
void |
toStart()
Set the current position to the fist message of all partitions.
|
close
Collection<MQPartition> assignments()
MQManager.subscribe(java.lang.String, java.util.Collection<java.lang.String>, org.nuxeo.ecm.platform.importer.mqueues.mqueues.MQRebalanceListener)
.MQRecord<M> read(Duration timeout) throws InterruptedException
MQRebalanceException
- if a partition rebalancing happen during the read,
this is possible only when using MQManager.subscribe(java.lang.String, java.util.Collection<java.lang.String>, org.nuxeo.ecm.platform.importer.mqueues.mqueues.MQRebalanceListener)
.InterruptedException
void commit()
MQOffset commit(MQPartition partition)
void toEnd()
void toStart()
void toLastCommitted()
boolean closed()
true
if the tailer has been closed.Copyright © 2017 Nuxeo. All rights reserved.