com.github.lemfi.kest.rabbitmq.builder.RabbitMQQueueSingleReaderExecutionBuilder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of step-rabbitmq Show documentation
Show all versions of step-rabbitmq Show documentation
Backends testing with Kotlin
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