Package io.kestra.jdbc.runner
Class JdbcQueue<T>
java.lang.Object
io.kestra.jdbc.runner.JdbcQueue<T>
- All Implemented Interfaces:
io.kestra.core.queues.QueueInterface<T>,Closeable,AutoCloseable
public abstract class JdbcQueue<T>
extends Object
implements io.kestra.core.queues.QueueInterface<T>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final JdbcQueue.Configurationprotected final JooqDSLContextWrapperprotected final JdbcQueueIndexerprotected static final com.fasterxml.jackson.databind.ObjectMapperprotected final MessageProtectionConfigurationprotected final io.kestra.core.queues.QueueServiceprotected final org.jooq.Table<org.jooq.Record> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidvoidvoidvoidmap(org.jooq.Result<org.jooq.Record> fetch) protected RunnableproduceFields(String consumerGroup, String key, T message) protected Stringreceive(String consumerGroup, Class<?> queueType, Consumer<io.kestra.core.utils.Either<T, io.kestra.core.exceptions.DeserializationException>> consumer, boolean forUpdate) receive(String consumerGroup, Consumer<io.kestra.core.utils.Either<T, io.kestra.core.exceptions.DeserializationException>> consumer, boolean forUpdate) protected org.jooq.Result<org.jooq.Record> receiveFetch(org.jooq.DSLContext ctx, String consumerGroup, Integer offset) protected abstract org.jooq.Result<org.jooq.Record> receiveFetch(org.jooq.DSLContext ctx, String consumerGroup, Integer offset, boolean forUpdate) protected org.jooq.Result<org.jooq.Record> receiveFetch(org.jooq.DSLContext ctx, String consumerGroup, String queueType) protected abstract org.jooq.Result<org.jooq.Record> receiveFetch(org.jooq.DSLContext ctx, String consumerGroup, String queueType, boolean forUpdate) receiveImpl(String consumerGroup, Class<?> queueType, BiConsumer<org.jooq.DSLContext, List<io.kestra.core.utils.Either<T, io.kestra.core.exceptions.DeserializationException>>> consumer, Boolean inTransaction, boolean forUpdate) receiveTransaction(String consumerGroup, Class<?> queueType, BiConsumer<org.jooq.DSLContext, List<io.kestra.core.utils.Either<T, io.kestra.core.exceptions.DeserializationException>>> consumer) protected voidsend(org.jooq.Result<org.jooq.Record> fetch, Consumer<io.kestra.core.utils.Either<T, io.kestra.core.exceptions.DeserializationException>> consumer) protected abstract voidupdateGroupOffsets(org.jooq.DSLContext ctx, String consumerGroup, String queueType, List<Integer> offsets) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.kestra.core.queues.QueueInterface
delete, emit, emitAsync, receive, receive, receive, receive
-
Field Details
-
MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper MAPPER -
queueService
protected final io.kestra.core.queues.QueueService queueService -
cls
-
dslContextWrapper
-
configuration
-
messageProtectionConfiguration
-
table
protected final org.jooq.Table<org.jooq.Record> table -
jdbcQueueIndexer
-
-
Constructor Details
-
JdbcQueue
-
-
Method Details
-
produceFields
protected Map<org.jooq.Field<Object>,Object> produceFields(String consumerGroup, String key, T message) throws io.kestra.core.queues.QueueException - Throws:
io.kestra.core.queues.QueueException
-
emitOnly
- Throws:
io.kestra.core.queues.QueueException
-
emit
- Specified by:
emitin interfaceio.kestra.core.queues.QueueInterface<T>- Throws:
io.kestra.core.queues.QueueException
-
emitAsync
- Specified by:
emitAsyncin interfaceio.kestra.core.queues.QueueInterface<T>- Throws:
io.kestra.core.queues.QueueException
-
delete
- Specified by:
deletein interfaceio.kestra.core.queues.QueueInterface<T>- Throws:
io.kestra.core.queues.QueueException
-
receiveFetch
-
receiveFetch
-
receiveFetch
-
receiveFetch
-
updateGroupOffsets
-
receive
public Runnable receive(String consumerGroup, Consumer<io.kestra.core.utils.Either<T, io.kestra.core.exceptions.DeserializationException>> consumer, boolean forUpdate) - Specified by:
receivein interfaceio.kestra.core.queues.QueueInterface<T>
-
receive
public Runnable receive(String consumerGroup, Class<?> queueType, Consumer<io.kestra.core.utils.Either<T, io.kestra.core.exceptions.DeserializationException>> consumer, boolean forUpdate) - Specified by:
receivein interfaceio.kestra.core.queues.QueueInterface<T>
-
receiveTransaction
-
receiveImpl
-
queueName
-
poll
-
map
-
send
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-