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

com.github.lemfi.kest.rabbitmq.executor.RabbitMQSingleMessagesQueueReaderExecution.kt Maven / Gradle / Ivy

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

import com.github.lemfi.kest.core.model.Execution
import com.github.lemfi.kest.rabbitmq.model.RabbitMQMessage

internal class RabbitMQSingleMessagesQueueReaderExecution(
    queueName: String,
    deleteQueue: Boolean,
    connection: String,
    vhost: String,
    l: ByteArray.() -> T,
) : Execution>() {

    val execution = RabbitMQMultipleMessagesQueueReaderExecution(queueName, deleteQueue, connection, vhost, 1, l)

    override fun onAssertionFailedError() {
        execution.onAssertionFailedError()
    }

    override fun onAssertionSuccess() {
        execution.onAssertionSuccess()
    }

    override fun onExecutionEnded() {
        execution.onExecutionEnded()
    }

    override fun execute(): RabbitMQMessage {
        return execution
            .execute()
            .first()
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy