All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.lemfi.kest.rabbitmq.builder.RabbitMQQueueSingleReaderExecutionBuilder.kt Maven / Gradle / Ivy

There is a newer version: 0.8.1
Show newest version
package com.github.lemfi.kest.rabbitmq.builder

import com.github.lemfi.kest.core.builder.ExecutionBuilder
import com.github.lemfi.kest.core.model.Execution
import com.github.lemfi.kest.rabbitmq.executor.RabbitMQSingleMessagesQueueReaderExecution
import com.github.lemfi.kest.rabbitmq.model.RabbitMQMessage
import com.github.lemfi.kest.rabbitmq.model.rabbitMQProperty

class RabbitMQQueueSingleReaderExecutionBuilder : ExecutionBuilder> {

    lateinit var queue: String

    lateinit var messageTransformer: ByteArray.() -> T

    @Suppress("MemberVisibilityCanBePrivate")
    var deleteQueue = false

    @Suppress("MemberVisibilityCanBePrivate")
    var connection = rabbitMQProperty { connection }

    @Suppress("MemberVisibilityCanBePrivate")
    var vhost = rabbitMQProperty { vhost }

    override fun toExecution(): Execution> {
        return RabbitMQSingleMessagesQueueReaderExecution(
            queue, deleteQueue, connection, vhost, messageTransformer
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy