Interface ServerConsumer
-
- All Superinterfaces:
Consumer,ConsumerInfo,PriorityAware
- All Known Implementing Classes:
ServerConsumerImpl
public interface ServerConsumer extends Consumer, ConsumerInfo
A ServerConsumer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Long>acknowledge(Transaction tx, long messageID)booleanallowReferenceCallback()the current queue settings will allow use of the Reference Execution and callback.voidbackToDelivering(MessageReference reference)Some protocols may choose to send the message back to delivering instead of redeliver.List<MessageReference>cancelRefs(boolean failed, boolean lastConsumedAsDelivered, Transaction tx)voidclose(boolean failed)voidfireSlowConsumer()voidforceDelivery(long sequence)ObjectgetConnectionID()longgetCreationTime()longgetID()ObjectgetProtocolContext()An object set by the Protocol implementation.ObjectgetProtocolData()this is to be used with anything specific on a protocol head.QueuegetQueue()StringgetSessionID()SlowConsumerDetectionListenergetSlowConsumerDetecion()voidindividualAcknowledge(Transaction tx, long messageID)voidindividualCancel(long messageID, boolean failed)booleanisBrowseOnly()voidreceiveCredits(int credits)voidreject(long messageID)voidremoveItself()This method is just to remove itself from Queues.MessageReferenceremoveReferenceByID(long messageID)List<MessageReference>scanDeliveringReferences(boolean remove, Function<MessageReference,Boolean> startFunction, Function<MessageReference,Boolean> endFunction)voidsetlowConsumerDetection(SlowConsumerDetectionListener listener)voidsetProtocolContext(Object protocolContext)voidsetProtocolData(Object protocolData)this is to be used with anything specific on a protocol head.voidsetStarted(boolean started)voidsetTransferring(boolean transferring)-
Methods inherited from interface org.apache.activemq.artemis.core.server.Consumer
debug, disconnect, errorProcessing, getBinding, getDeliveringMessages, getFilter, getPriority, handle, proceedDeliver, promptDelivery, sequentialID, supportsDirectDelivery, toManagementString
-
Methods inherited from interface org.apache.activemq.artemis.core.server.ConsumerInfo
getConnectionClientID, getConnectionLocalAddress, getConnectionProtocolName, getConnectionRemoteAddress, getFilterString, getQueueAddress, getQueueName, getQueueType, getSequentialID, getSessionName
-
-
-
-
Method Detail
-
setlowConsumerDetection
void setlowConsumerDetection(SlowConsumerDetectionListener listener)
-
getSlowConsumerDetecion
SlowConsumerDetectionListener getSlowConsumerDetecion()
-
fireSlowConsumer
void fireSlowConsumer()
-
allowReferenceCallback
boolean allowReferenceCallback()
the current queue settings will allow use of the Reference Execution and callback. This is because
-
getProtocolData
Object getProtocolData()
this is to be used with anything specific on a protocol head.
-
setProtocolData
void setProtocolData(Object protocolData)
this is to be used with anything specific on a protocol head.
-
setProtocolContext
void setProtocolContext(Object protocolContext)
- Parameters:
protocolContext-- See Also:
getProtocolContext()
-
getProtocolContext
Object getProtocolContext()
An object set by the Protocol implementation. it could be anything pre-determined by the implementation
-
getID
long getID()
-
getConnectionID
Object getConnectionID()
-
removeItself
void removeItself() throws ExceptionThis method is just to remove itself from Queues. If for any reason during a close an exception occurred, the exception treatment will call removeItself what should take the consumer out of any queues.- Throws:
Exception
-
cancelRefs
List<MessageReference> cancelRefs(boolean failed, boolean lastConsumedAsDelivered, Transaction tx) throws Exception
- Throws:
Exception
-
setStarted
void setStarted(boolean started)
-
receiveCredits
void receiveCredits(int credits)
-
getQueue
Queue getQueue()
-
removeReferenceByID
MessageReference removeReferenceByID(long messageID) throws Exception
- Throws:
Exception
-
backToDelivering
void backToDelivering(MessageReference reference)
Some protocols may choose to send the message back to delivering instead of redeliver. For example openwire will redeliver through the client, so messages will go back to delivering list after rollback.
-
scanDeliveringReferences
List<MessageReference> scanDeliveringReferences(boolean remove, Function<MessageReference,Boolean> startFunction, Function<MessageReference,Boolean> endFunction)
-
acknowledge
List<Long> acknowledge(Transaction tx, long messageID) throws Exception
- Throws:
Exception
-
individualAcknowledge
void individualAcknowledge(Transaction tx, long messageID) throws Exception
- Throws:
Exception
-
individualCancel
void individualCancel(long messageID, boolean failed) throws Exception- Throws:
Exception
-
forceDelivery
void forceDelivery(long sequence)
-
setTransferring
void setTransferring(boolean transferring)
-
isBrowseOnly
boolean isBrowseOnly()
-
getCreationTime
long getCreationTime()
-
getSessionID
String getSessionID()
-
-