Package dk.cloudcreate.essentials.components.foundation.messaging.queue
-
Interface Summary Interface Description DurableQueueConsumer DurableQueuesconsumerDurableQueueConsumerNotifications Notification interface thatDurableQueueConsumercan implement if they want to be notified about messages being added to the queue they're consuming from
This is required forDurableQueueConsumer's that use aQueuePollingOptimizerDurableQueues TheDurableQueuesconcept supports intra-service point-to-point messaging using durable Queues that guarantee At-Least-Once delivery of messages.
The only requirement is that message producers and message consumers can access the same underlying durable Queue storage.DurableQueuesInterceptor QueuedMessage Represents aMessagethat has been queued usingQueueMessage/QueueMessages/QueueMessageAsDeadLetterMessageQueuedMessageHandler QueuePollingOptimizer Optimizer designed to work together with theDefaultDurableQueueConsumer
The optimizer is responsible for optimizing the frequency by which theDefaultDurableQueueConsumeris polling the underlying database for new messages related to a givenQueueName.
If a given Queue doesn't experience a high influx of message, or a lot of message's have (QueuedMessage.getNextDeliveryTimestamp()) that is further into the future, then it doesn't make sense to poll the database too often.
TheQueuePollingOptimizer.SimpleQueuePollingOptimizersupports extending the polling sleep time (i.e. -
Class Summary Class Description DefaultDurableQueueConsumer<DURABLE_QUEUES extends DurableQueues,UOW extends UnitOfWork,UOW_FACTORY extends UnitOfWorkFactory<UOW>> The defaultDurableQueueConsumerwhich provides basic implementation (including retrying messages in case of failure, polling interval optimization, etc.)DefaultQueuedMessage Represents a message queued onto a Durable QueueMessage Encapsulates a Message, which is aPairof Payload and itsMessageMetaDataMessageMetaData Encapsulated Metadata (like headers, correlation id, tracing id's, etc.) associated with aMessageNextQueuedMessage OrderedMessage Represents a message that will be delivered in order.
This of course requires that message are queued in order and that the consumer is single threaded.
All messages sharing the sameOrderedMessage.key, will be delivered according to theirOrderedMessage.order
An example of a message key is the id of the entity the message relates toPatternMatchingQueuedMessageHandler Pattern matchingQueuedMessageHandlerfor use withDurableQueues's
ThePatternMatchingQueuedMessageHandlerwill automatically call methods annotated with the @MessageHandler annotation and where the 1st argument matches the actual Message payload type (contained in theMessage.getPayload()provided to theQueuedMessageHandler.handle(QueuedMessage)method)QueueEntryId The unique entry for a message in a queue.QueueName The name of a Durable QueueQueuePollingOptimizer.SimpleQueuePollingOptimizer TheQueuePollingOptimizer.SimpleQueuePollingOptimizersupports extending the polling sleep time (i.e. -
Enum Summary Enum Description DurableQueues.QueueingSortOrder The sorting order for theQueuedMessage.getId()QueuedMessage.DeliveryMode TransactionalMode The transactional behaviour mode of aDurableQueues -
Exception Summary Exception Description DurableQueueException