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

com.github.lemfi.kest.rabbitmq.builder.RabbitMQQueueMultipleMessagesReaderExecutionBuilder.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.RabbitMQMultipleMessagesQueueReaderExecution
import com.github.lemfi.kest.rabbitmq.model.RabbitMQMessage
import com.github.lemfi.kest.rabbitmq.model.rabbitMQProperty

class RabbitMQQueueMultipleMessagesReaderExecutionBuilder : ExecutionBuilder>> {

    lateinit var queue: String

    var nbMessages: Int = 1

    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 RabbitMQMultipleMessagesQueueReaderExecution(
            queue, deleteQueue, connection, vhost, nbMessages, messageTransformer
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy