All Classes and Interfaces

Class
Description
Mark the message as acknowledged - this operation also deletes the messages from the Queue
Note this method MUST be called within an existing UnitOfWork IF using TransactionalMode.FullyTransactional
Operation also matches DurableQueuesInterceptor.intercept(AcknowledgeMessageAsHandled, InterceptorChain)
Version of UnitOfWork that's aware of the ClientSession associated with the current UnitOfWork
Will likely be removed in the future as having access to the ClientSession doesn't seem to be needed
Start an asynchronous message consumer.
Note: There can only be one DurableQueueConsumer per QueueName per DurableQueues instance Operation also matches DurableQueuesInterceptor.intercept(ConsumeFromQueue, InterceptorChain)
Builder for ConsumeFromQueue
A correlation id is used to link multiple Messages or Events together in a distributed system
 
 
The default DurableQueueConsumer which provides basic implementation (including retrying messages in case of failure, polling interval optimization, etc.)
Log levels of interest:
Represents a message queued onto a Durable Queue
Delete a message (Queued or Dead Letter Message)
Note this method MUST be called within an existing UnitOfWork IF using TransactionalMode.FullyTransactional
Operation also matches DurableQueuesInterceptor.intercept(DeleteMessage, InterceptorChain)
Builder for DeleteMessage
Provides a JVM local and durable, in regard to DurableLocalCommandBus.sendAndDontWait(Object)/DurableLocalCommandBus.sendAndDontWait(Object, Duration)), variant of the CommandBus concept
Durability for DurableLocalCommandBus.sendAndDontWait(Object)/DurableLocalCommandBus.sendAndDontWait(Object, Duration)) is delegated to DurableQueues
Which QueueName that is used will be determined by the specified DurableLocalCommandBus.getCommandQueueName()
The RedeliveryPolicy is determined by the specified DurableLocalCommandBus.getCommandQueueRedeliveryPolicy()

Note: If the SendAndDontWaitErrorHandler provided doesn't rethrow the exception, then the underlying DurableQueues will not be able to retry the command.
Due to this the DurableLocalCommandBus defaults to using the SendAndDontWaitErrorHandler.RethrowingSendAndDontWaitErrorHandler
DurableQueues consumer
Notification interface that DurableQueueConsumer can implement if they want to be notified about messages being added to the queue they're consuming from
This is required for DurableQueueConsumer's that use a QueuePollingOptimizer
 
The DurableQueues concept 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.
The sorting order for the QueuedMessage.getId()
 
 
 
An Event id provides a unique identifier for an Event
Builder for RedeliveryPolicy that allows for defining an Exponential Backoff strategy - similar to RedeliveryPolicyBuilder
Represents a named fenced lock, where the FencedLock.getCurrentToken() can be passed on to down stream logic, which can keep track of the token value to identify if a timed out lock is being used to request logic.
The fence locking concept is described here https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html
 
Is published on the LocalEventBus when a Lifecycle.start() is called (and the lock manager isn't already started)
Is published on the LocalEventBus when a Lifecycle.stop() is called (and the lock manager isn't already stopped)
 
 
 
This library provides a Distributed Locking Manager based of the Fenced Locking concept described here

The FencedLockManager is responsible for obtaining and managing distributed FencedLock's, which are named exclusive locks.
Only one FencedLockManager instance can acquire a FencedLock at a time.
The implementation has been on supporting intra-service (i.e.
 
A builder for defining a RedeliveryPolicy with a Fixed Backoff strategy
Generic HandleAwareUnitOfWorkFactory variant where the implementation manually manages the UnitOfWork and the underlying database Transaction.
This class is built for inheritance, but can also be used directly - e.g.
 
Query Dead Letter Messages (i.e.
Query the next Queued Message (i.e.
Builder for GetQueuedMessage
Query Queued Messages (i.e.
Builder for GetQueuedMessages
Get the total number of dead-letter-messages/poison-messages queued for the given queue
Operation also matched DurableQueuesInterceptor.intercept(GetTotalDeadLetterMessagesQueuedFor, InterceptorChain)
Get the total number of messages queued (i.e.
Version of UnitOfWork that's aware of the Handle associated with the current UnitOfWork
Specialization of UnitOfWorkFactory that created and maintains HandleAwareUnitOfWork's
The Inbox supports the transactional Store and Forward pattern from Enterprise Integration Patterns supporting At-Least-Once delivery guarantee.
The Inbox pattern is used to handle incoming messages from a message infrastructure (such as a Queue, Kafka, EventBus, etc).
 
 
The Inbox supports the transactional Store and Forward pattern from Enterprise Integration Patterns supporting At-Least-Once delivery guarantee.
The Inbox pattern is used to handle incoming messages from a message infrastructure (such as a Queue, Kafka, EventBus, etc).
 
The name of an Inbox
 
Jackson ObjectMapper based JSONSerializer
 
 
 
JSON serializer and deserializer
Common process life cycle interface
A builder for defining a RedeliveryPolicy with a Linear Backoff strategy
Helper class for setting up the NOTIFY part of the classical Postgresql LISTEN/NOTIFY concept.
See https://jdbc.postgresql.org/documentation/81/listennotify.html and
https://www.postgresql.org/docs/current/sql-notify.html
 
 
 
Contains the name of a FencedLock
Mark an already Queued Message as a Dead Letter Message (or Poison Message).
Dead Letter Messages won't be delivered to any DurableQueueConsumer (called by the DurableQueueConsumer)
To deliver a Dead Letter Message you must first resurrect the message using DurableQueues.resurrectDeadLetterMessage(QueueEntryId, Duration)
Note this method MUST be called within an existing UnitOfWork IF using TransactionalMode.FullyTransactional
Operation also matches DurableQueuesInterceptor.intercept(MarkAsDeadLetterMessage, InterceptorChain)
Encapsulates a Message, which is a Pair of Payload and its MessageMetaData
Defines how messages can be consumed by the provided message consumer
Strategy for resolving which errors, experienced during Message delivery by the DurableQueueConsumer, should be instantly marked as a Poison-Message/Dead-Letter-Message or if we can attempt message redelivery according to the specified RedeliveryPolicy
 
 
 
Methods annotated with this Annotation will automatically be called when a PatternMatchingQueuedMessageHandler and PatternMatchingMessageHandler receives respectively a QueuedMessage or a Message where the Message.getPayload() matches the type of the first argument/parameter on a method annotated with @MessageHandler
 
A message id provides a unique identifier for a Message in a distributed system
Encapsulated Metadata (like headers, correlation id, tracing id's, etc.) associated with a Message
Variant of ListenNotify.listen(Jdbi, String, Duration) that allows you to listen for notifications from multiple tables using a single polling thread
 
 
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 same OrderedMessage.key, will be delivered according to their OrderedMessage.order
An example of a message key is the id of the entity the message relates to
The Outbox supports the transactional Store and Forward pattern from Enterprise Integration Patterns supporting At-Least-Once delivery guarantee.
The Outbox pattern is used to handle outgoing messages, that are created as a side effect of adding/updating an entity in a database, but where the message infrastructure (such as a Queue, Kafka, EventBus, etc.) that doesn't share the same underlying transactional resource as the database.
Instead, you need to use an Outbox that can join in the same UnitOfWork/transactional-resource that the database is using.
The message is added to the Outbox in a transaction/UnitOfWork and afterwards the UnitOfWork is committed.
If the transaction fails then both the entity and the message will be rolled back when then UnitOfWork rolls back.
After the UnitOfWork has been committed, the messages will be asynchronously delivered to the message consumer in a new UnitOfWork.
The Outbox itself supports Message Redelivery in case the Message consumer experiences failures.
This means that the Message consumer, registered with the Outbox, can and will receive Messages more than once and therefore its message handling has to be idempotent.
 
 
The Outbox supports the transactional Store and Forward pattern from Enterprise Integration Patterns supporting At-Least-Once delivery guarantee.
The Outbox pattern is used to handle outgoing messages, that are created as a side effect of adding/updating an entity in a database, but where the message infrastructure (such as a Queue, Kafka, EventBus, etc.) that doesn't share the same underlying transactional resource as the database.
Instead, you need to use an Outbox that can join in the same UnitOfWork/transactional-resource that the database is using.
The message is added to the Outbox in a transaction/UnitOfWork and afterwards the UnitOfWork is committed.
If the transaction fails then both the entity and the message will be rolled back when then UnitOfWork rolls back.
After the UnitOfWork has been committed, the messages will be asynchronously delivered to the message consumer in a new UnitOfWork.
The Outbox itself supports Message Redelivery in case the Message consumer experiences failures.
This means that the Message consumer, registered with the Outbox, can and will receive Messages more than once and therefore its message handling has to be idempotent.
 
The name of an Outbox
Pattern matching Consumer<Message> for use with Inboxes/Inbox or Outboxes/Outbox
The PatternMatchingMessageHandler will automatically call methods annotated with the @MessageHandler annotation and where the 1st argument matches the actual Message payload type (contained in the Message.getPayload() provided to the provided Consumer)
Pattern matching QueuedMessageHandler for use with DurableQueues's
The PatternMatchingQueuedMessageHandler will automatically call methods annotated with the @MessageHandler annotation and where the 1st argument matches the actual Message payload type (contained in the Message.getPayload() provided to the QueuedMessageHandler.handle(QueuedMessage) method)
 
Delete all messages (Queued or Dead letter Messages) in the given queue
Operation also matches DurableQueuesInterceptor.intercept(PurgeQueue, InterceptorChain)
Builder for PurgeQueue
Represents a Message that has been queued using QueueMessage/QueueMessages/QueueMessageAsDeadLetterMessage
 
 
The unique entry for a message in a queue.
Queue a message for asynchronous delivery optional delay to a DurableQueueConsumer
Note this method MUST be called within an existing UnitOfWork IF using TransactionalMode.FullyTransactional
Operation also matches DurableQueuesInterceptor.intercept(QueueMessage, InterceptorChain)
Queue the message directly as a Dead Letter Message.
Builder for QueueMessage
Queue multiple messages to the same queue.
Builder for QueueMessages
The name of a Durable Queue
Optimizer designed to work together with the DefaultDurableQueueConsumer
The optimizer is responsible for optimizing the frequency by which the DefaultDurableQueueConsumer is polling the underlying database for new messages related to a given QueueName.
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.
The QueuePollingOptimizer.SimpleQueuePollingOptimizer supports extending the polling sleep time (i.e.
The QueuePollingOptimizer.SimpleQueuePollingOptimizer supports extending the polling sleep time (i.e.
RandomId generator that either: Generates UUIDv1 time-based (i.e.
In case the message delivery, handled by the DurableQueueConsumer, experiences an error/exception, then the RedeliveryPolicy determines, with the aid of the MessageDeliveryErrorHandler and the provided delivery settings, IF a Message should be retried (DurableQueues.retryMessage(RetryMessage) or if it's going to be marked as a Poison-Message/Dead-Letter-Message (DurableQueues.markAsDeadLetterMessage(MarkAsDeadLetterMessage))
 
Resurrect a Dead Letter Message for redelivery after the specified deliveryDelay
Note this method MUST be called within an existing UnitOfWork IF using TransactionalMode.FullyTransactional
Operation also matches DurableQueuesInterceptor.intercept(ResurrectDeadLetterMessage, InterceptorChain)
Schedule the message for redelivery after the specified deliveryDelay (called by the DurableQueueConsumer)
Note this method MUST be called within an existing UnitOfWork IF using TransactionalMode.FullyTransactional
Operation also matches DurableQueuesInterceptor.intercept(RetryMessage, InterceptorChain)
Builder for RetryMessage
 
 
 
SpringTransactionAwareUnitOfWork<TRX_MGR extends org.springframework.transaction.PlatformTransactionManager,UOW extends SpringTransactionAwareUnitOfWork<TRX_MGR,UOW>>
Spring transaction-aware UnitOfWork
Specializations can choose to override SpringTransactionAwareUnitOfWork.onStart() to initialize any datastore specific resources (e.g.
SpringTransactionAwareUnitOfWorkFactory<TRX_MGR extends org.springframework.transaction.PlatformTransactionManager,UOW extends SpringTransactionAwareUnitOfWork<TRX_MGR,UOW>>
Variant of the UnitOfWorkFactory which can delegate the creation of the underlying transaction to the provided PlatformTransactionManager instance.
The UnitOfWork type specialization needs to extend SpringTransactionAwareUnitOfWork
Log the execution time for SQL statements
Stop an asynchronous message consumer.
Is initiated when DurableQueueConsumer.cancel() is called Operation also matches DurableQueuesInterceptor.intercept(StopConsumingFromQueue, InterceptorChain)
A subscriber id is used to uniquely identify an event subscriber
Represents a base notification, which is a change to a given table caused by a specific ListenNotify.SqlOperation
Marker interface for types that are used to distinguish between Tenant specific data in a data store.
A tenant can be as simple as a SingleValueType or it can be more complex such as including both Tenant-Id and a CountryCode denoting the country where the Tenant data is owned.
The serialization of the tenant is always the Object.toString() value, and it is deserialized by using a default single string argument constructor
Simple single value Tenant identifier
The transactional behaviour mode of a DurableQueues.
 
CommandBusInterceptor that ensures that each Command is handled within a UnitOfWork by using the UnitOfWorkFactory.withUnitOfWork(CheckedFunction)
Represents an Exception that occurred in relation to a UnitOfWork
This interface creates a UnitOfWork
Callback that can be registered with a UnitOfWork in relation to one of more Resources (can e.g.
The status of a UnitOfWork