Class AbstractSubscriber
java.lang.Object
com.mulesoft.extension.mq.internal.AbstractSubscriber
- All Implemented Interfaces:
MQSubscriber
- Direct Known Subclasses:
PollingSubscriber,PrefetchSubscriber
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SubscriberAckModeprotected final longprotected final com.mulesoft.mq.restclient.circuit.MQCircuitBreakerprotected final com.mulesoft.mq.restclient.internal.Destinationprotected AtomicBoolean -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSubscriber(SubscriberAckMode acknowledgementMode, long acknowledgementTimeout, com.mulesoft.mq.restclient.internal.Destination destination, MessageListener messageListener, com.mulesoft.mq.restclient.circuit.MQCircuitBreaker circuitBreaker) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidprotected voidprotected voidprotected voidprotected voidprocessMessage(com.mulesoft.mq.restclient.client.mq.domain.AnypointMQMessage message) protected voidprocessMessages(Iterator<com.mulesoft.mq.restclient.client.mq.domain.AnypointMQMessage> messages) protected voidprocessMessages(List<com.mulesoft.mq.restclient.client.mq.domain.AnypointMQMessage> messages) voidstart()Begin the retrieval of messages from a destinationvoidstop()Stop the retrieval of messages from a destinationprotected void
-
Field Details
-
circuitBreaker
protected final com.mulesoft.mq.restclient.circuit.MQCircuitBreaker circuitBreaker -
destination
protected final com.mulesoft.mq.restclient.internal.Destination destination -
acknowledgementMode
-
acknowledgementTimeout
protected final long acknowledgementTimeout -
isRunning
-
-
Constructor Details
-
AbstractSubscriber
public AbstractSubscriber(SubscriberAckMode acknowledgementMode, long acknowledgementTimeout, com.mulesoft.mq.restclient.internal.Destination destination, MessageListener messageListener, com.mulesoft.mq.restclient.circuit.MQCircuitBreaker circuitBreaker)
-
-
Method Details
-
start
public void start()Description copied from interface:MQSubscriberBegin the retrieval of messages from a destination- Specified by:
startin interfaceMQSubscriber
-
stop
public void stop()Description copied from interface:MQSubscriberStop the retrieval of messages from a destination- Specified by:
stopin interfaceMQSubscriber
-
submitWork
protected void submitWork() -
doSubmitWork
protected abstract void doSubmitWork() -
handleError
-
processMessages
protected void processMessages(List<com.mulesoft.mq.restclient.client.mq.domain.AnypointMQMessage> messages) -
processMessages
protected void processMessages(Iterator<com.mulesoft.mq.restclient.client.mq.domain.AnypointMQMessage> messages) -
processMessage
protected void processMessage(com.mulesoft.mq.restclient.client.mq.domain.AnypointMQMessage message) -
nackAll
protected void nackAll(Iterator<com.mulesoft.mq.restclient.client.mq.domain.AnypointMQMessage> messages) -
nackAll
protected void nackAll(List<com.mulesoft.mq.restclient.client.mq.domain.AnypointMQMessage> messages)
-