Class AMQConsumer
- java.lang.Object
-
- org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConsumer
-
public class AMQConsumer extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AMQConsumer(AMQSession amqSession, org.apache.activemq.command.ActiveMQDestination d, org.apache.activemq.command.ConsumerInfo info, java.util.concurrent.ScheduledExecutorService scheduledPool, boolean internalAddress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacknowledge(org.apache.activemq.command.MessageAck ack)The acknowledgement in openwire is done based on intervals.voidacquireCredit(int n, boolean delivered)voidaddRolledback(org.apache.activemq.artemis.core.server.MessageReference messageReference)voidbrowseFinished()org.apache.activemq.command.ConsumerIdgetId()org.apache.activemq.command.ConsumerInfogetInfo()org.apache.activemq.command.ActiveMQDestinationgetOpenwireDestination()protected java.util.Set<org.apache.activemq.artemis.core.server.MessageReference>getRolledbackMessageRefs()inthandleDeliver(org.apache.activemq.artemis.core.server.MessageReference reference, org.apache.activemq.artemis.api.core.ICoreMessage message)voidhandleDeliverNullDispatch()booleanhasCredits()voidinit(org.apache.activemq.artemis.core.server.SlowConsumerDetectionListener slowConsumerDetectionListener, long nativeId)voidprocessMessagePull(org.apache.activemq.command.MessagePull messagePull)voidremoveConsumer()voidremoveRolledback(org.apache.activemq.artemis.core.server.MessageReference messageReference)voidsetPrefetchSize(int prefetchSize)booleanupdateDeliveryCountAfterCancel(org.apache.activemq.artemis.core.server.MessageReference ref)
-
-
-
Constructor Detail
-
AMQConsumer
public AMQConsumer(AMQSession amqSession, org.apache.activemq.command.ActiveMQDestination d, org.apache.activemq.command.ConsumerInfo info, java.util.concurrent.ScheduledExecutorService scheduledPool, boolean internalAddress)
-
-
Method Detail
-
getRolledbackMessageRefs
protected java.util.Set<org.apache.activemq.artemis.core.server.MessageReference> getRolledbackMessageRefs()
-
init
public void init(org.apache.activemq.artemis.core.server.SlowConsumerDetectionListener slowConsumerDetectionListener, long nativeId) throws java.lang.Exception- Throws:
java.lang.Exception
-
getId
public org.apache.activemq.command.ConsumerId getId()
-
acquireCredit
public void acquireCredit(int n, boolean delivered)
-
handleDeliver
public int handleDeliver(org.apache.activemq.artemis.core.server.MessageReference reference, org.apache.activemq.artemis.api.core.ICoreMessage message)
-
handleDeliverNullDispatch
public void handleDeliverNullDispatch()
-
acknowledge
public void acknowledge(org.apache.activemq.command.MessageAck ack) throws java.lang.ExceptionThe acknowledgement in openwire is done based on intervals. We will iterate through the list of delivering messages atServerConsumer.scanDeliveringReferences(boolean, Function, Function)and add those to the Transaction. Notice that we will start a new transaction on the cases where there is no transaction.- Throws:
java.lang.Exception
-
browseFinished
public void browseFinished()
-
getInfo
public org.apache.activemq.command.ConsumerInfo getInfo()
-
hasCredits
public boolean hasCredits()
-
processMessagePull
public void processMessagePull(org.apache.activemq.command.MessagePull messagePull) throws java.lang.Exception- Throws:
java.lang.Exception
-
removeConsumer
public void removeConsumer() throws java.lang.Exception- Throws:
java.lang.Exception
-
getOpenwireDestination
public org.apache.activemq.command.ActiveMQDestination getOpenwireDestination()
-
setPrefetchSize
public void setPrefetchSize(int prefetchSize)
-
updateDeliveryCountAfterCancel
public boolean updateDeliveryCountAfterCancel(org.apache.activemq.artemis.core.server.MessageReference ref)
-
removeRolledback
public void removeRolledback(org.apache.activemq.artemis.core.server.MessageReference messageReference)
-
addRolledback
public void addRolledback(org.apache.activemq.artemis.core.server.MessageReference messageReference)
-
-