public class LastValueQueue extends QueueImpl
Message.HDR_LAST_VALUE_NAME
property value. In other words it only retains the last
value
This is useful for example, for stock prices, where you're only interested in the latest value for a particular stock
QueueImpl.ConsumerHolder<T extends Consumer>
CHECK_QUEUE_SIZE_PERIOD, CRITICAL_CHECK_DEPAGE, CRITICAL_CONSUMER, CRITICAL_DELIVER, CRITICAL_PATH_ADD_HEAD, CRITICAL_PATH_ADD_TAIL, CRITICAL_PATHS, DEFAULT_FLUSH_LIMIT, DELIVERY_TIMEOUT, dispatching, dispatchStartTime, MAX_DELIVERIES_IN_LOOP, NUM_PRIORITIES, REDISTRIBUTOR_BATCH_SIZE, scheduledDeliveryHandler
MAX_CONSUMERS_UNLIMITED
Constructor and Description |
---|
LastValueQueue(long persistenceID,
SimpleString address,
SimpleString name,
Filter filter,
PageSubscription pageSubscription,
SimpleString user,
boolean durable,
boolean temporary,
boolean autoCreated,
RoutingType routingType,
Integer maxConsumers,
Boolean exclusive,
Boolean groupRebalance,
Integer groupBuckets,
SimpleString groupFirstKey,
Integer consumersBeforeDispatch,
Long delayBeforeDispatch,
Boolean purgeOnNoConsumers,
SimpleString lastValueKey,
Boolean nonDestructive,
Boolean autoDelete,
Long autoDeleteDelay,
Long autoDeleteMessageCount,
boolean configurationManaged,
ScheduledExecutorService scheduledExecutor,
PostOffice postOffice,
StorageManager storageManager,
HierarchicalRepository<AddressSettings> addressSettingsRepository,
ArtemisExecutor executor,
ActiveMQServer server,
QueueFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(MessageReference ref,
AckReason reason,
ServerConsumer consumer) |
void |
addHead(MessageReference ref,
boolean scheduling) |
void |
addTail(MessageReference ref,
boolean direct) |
boolean |
allowsReferenceCallback()
the current queue and consumer settings will allow use of the Reference Execution and callback.
|
boolean |
equals(Object obj) |
SimpleString |
getLastValueKey() |
Set<SimpleString> |
getLastValueKeys() |
int |
hashCode() |
boolean |
isLastValue() |
protected void |
refRemoved(MessageReference ref) |
acknowledge, acknowledge, acknowledge, acknowledge, addConsumer, addHead, addRedistributor, addTail, browserIterator, cancel, cancel, cancel, cancelRedistributor, changeReferencePriority, changeReferencesPriority, checkRedelivery, close, debug, decDelivering, deleteAllReferences, deleteAllReferences, deleteMatchingReferences, deleteMatchingReferences, deleteQueue, deleteQueue, deleteReference, deliverAsync, deliverNow, deliverScheduledMessages, destroyPaging, errorProcessing, expire, expire, expireReference, expireReferences, expireReferences, finalize, flushExecutor, forceDelivery, getAcknowledgeAttempts, getAddress, getAutoDeleteDelay, getAutoDeleteMessageCount, getConsumerCount, getConsumerRemovedTimestamp, getConsumers, getConsumersBeforeDispatch, getConsumersRefCount, getDelayBeforeDispatch, getDeliveringCount, getDeliveringMessages, getDeliveringSize, getDispatchStartTime, getDurableDeliveringCount, getDurableDeliveringSize, getDurableMessageCount, getDurablePersistentSize, getDurableScheduledCount, getDurableScheduledSize, getExecutor, getExpiryAddress, getFilter, getGroupBuckets, getGroupCount, getGroupFirstKey, getGroups, getID, getMaxConsumers, getMessageCount, getMessagesAcknowledged, getMessagesAdded, getMessagesExpired, getMessagesKilled, getName, getNumberOfReferences, getPageSubscription, getPersistentSize, getRate, getReference, getRoutingName, getRoutingType, getScheduledCount, getScheduledMessages, getScheduledSize, getUniqueName, getUser, groupMap, hasMatchingConsumer, incrementMesssagesAdded, isAutoCreated, isAutoDelete, isConfigurationManaged, isDirectDeliver, isDispatching, isDurable, isDurableMessage, isExclusive, isExpirationRedundant, isGroupRebalance, isInternalQueue, isNonDestructive, isPaused, isPersistedPause, isPurgeOnNoConsumers, isTemporary, iterator, moveReference, moveReferences, moveReferences, moveReferencesBetweenSnFQueues, pause, pause, postAcknowledge, reacknowledge, recheckRefCount, refAdded, referenceHandled, reload, reloadPause, removeConsumer, removeMessageReference, removeReferenceWithID, resetAllGroups, resetAllIterators, resetGroup, resetMessagesAcknowledged, resetMessagesAdded, resetMessagesExpired, resetMessagesKilled, resume, retryMessages, route, routeWithAck, scheduleIfPossible, sendMessagesToDeadLetterAddress, sendMessageToDeadLetterAddress, sendToDeadLetterAddress, setConfigurationManaged, setConsumersBeforeDispatch, setConsumersRefCount, setDelayBeforeDispatch, setDispatching, setExclusive, setFilter, setGroupBuckets, setGroupFirstKey, setGroupRebalance, setInternalQueue, setMaxConsumer, setNonDestructive, setPurgeOnNoConsumers, setRoutingType, setUser, toString, unproposed
enterCritical, getCriticalAnalyzer, isExpired, leaveCritical
deleteMatchingReferences
enterCritical, getCriticalAnalyzer, isExpired, leaveCritical
public LastValueQueue(long persistenceID, SimpleString address, SimpleString name, Filter filter, PageSubscription pageSubscription, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, RoutingType routingType, Integer maxConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean purgeOnNoConsumers, SimpleString lastValueKey, Boolean nonDestructive, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean configurationManaged, ScheduledExecutorService scheduledExecutor, PostOffice postOffice, StorageManager storageManager, HierarchicalRepository<AddressSettings> addressSettingsRepository, ArtemisExecutor executor, ActiveMQServer server, QueueFactory factory)
public void addTail(MessageReference ref, boolean direct)
public void addHead(MessageReference ref, boolean scheduling)
public boolean allowsReferenceCallback()
Queue
allowsReferenceCallback
in interface Queue
allowsReferenceCallback
in class QueueImpl
protected void refRemoved(MessageReference ref)
refRemoved
in class QueueImpl
public void acknowledge(MessageReference ref, AckReason reason, ServerConsumer consumer) throws Exception
acknowledge
in interface Queue
acknowledge
in class QueueImpl
Exception
public boolean isLastValue()
isLastValue
in interface Queue
isLastValue
in class QueueImpl
public SimpleString getLastValueKey()
getLastValueKey
in interface Queue
getLastValueKey
in class QueueImpl
public Set<SimpleString> getLastValueKeys()
Copyright © 2019 JBoss by Red Hat. All rights reserved.