public class ChronicleCompoundMQTailer<M extends Externalizable> extends Object implements MQTailer<M>
Constructor and Description |
---|
ChronicleCompoundMQTailer(Collection<ChronicleMQTailer<M>> tailers,
String group) |
Modifier and Type | Method and Description |
---|---|
Collection<MQPartition> |
assignments()
Returns the list of MQueue name/partition tuples currently assigned to this tailer.
|
void |
close() |
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 |
seek(MQPartition partition,
MQOffset offset) |
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.
|
public ChronicleCompoundMQTailer(Collection<ChronicleMQTailer<M>> tailers, String group)
public MQRecord<M> read(Duration timeout) throws InterruptedException
MQTailer
read
in interface MQTailer<M extends Externalizable>
InterruptedException
public MQOffset commit(MQPartition partition)
MQTailer
commit
in interface MQTailer<M extends Externalizable>
public void commit()
MQTailer
commit
in interface MQTailer<M extends Externalizable>
public void toEnd()
MQTailer
toEnd
in interface MQTailer<M extends Externalizable>
public void toStart()
MQTailer
toStart
in interface MQTailer<M extends Externalizable>
public void toLastCommitted()
MQTailer
toLastCommitted
in interface MQTailer<M extends Externalizable>
public Collection<MQPartition> assignments()
MQTailer
MQManager.subscribe(java.lang.String, java.util.Collection<java.lang.String>, org.nuxeo.ecm.platform.importer.mqueues.mqueues.MQRebalanceListener)
.assignments
in interface MQTailer<M extends Externalizable>
public String group()
MQTailer
group
in interface MQTailer<M extends Externalizable>
public boolean closed()
MQTailer
true
if the tailer has been closed.closed
in interface MQTailer<M extends Externalizable>
public void seek(MQPartition partition, MQOffset offset)
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2017 Nuxeo. All rights reserved.