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 DataSourceprotected final JooqDSLContextWrapperprotected Booleanprotected final JdbcQueueIndexerprotected static final com.fasterxml.jackson.databind.ObjectMapperprotected 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) voidpause()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) receive(String consumerGroup, Consumer<io.kestra.core.utils.Either<T, io.kestra.core.exceptions.DeserializationException>> consumer) protected abstract 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, String queueType) receiveImpl(String consumerGroup, Class<?> queueType, BiConsumer<org.jooq.DSLContext, List<io.kestra.core.utils.Either<T, io.kestra.core.exceptions.DeserializationException>>> consumer, Boolean inTransaction) 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
-
Field Details
-
mapper
protected static final com.fasterxml.jackson.databind.ObjectMapper mapper -
queueService
protected final io.kestra.core.queues.QueueService queueService -
cls
-
dslContextWrapper
-
dataSource
-
configuration
-
table
protected final org.jooq.Table<org.jooq.Record> table -
jdbcQueueIndexer
-
isShutdown
-
-
Constructor Details
-
JdbcQueue
-
-
Method Details
-
produceFields
-
emitOnly
-
emit
- Specified by:
emitin interfaceio.kestra.core.queues.QueueInterface<T>
-
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
-
updateGroupOffsets
-
receive
public Runnable receive(String consumerGroup, Consumer<io.kestra.core.utils.Either<T, io.kestra.core.exceptions.DeserializationException>> consumer) - 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) - Specified by:
receivein interfaceio.kestra.core.queues.QueueInterface<T>
-
receiveTransaction
-
receiveImpl
-
queueName
-
poll
-
map
-
send
-
pause
public void pause()- Specified by:
pausein interfaceio.kestra.core.queues.QueueInterface<T>
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-