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

org.wildfly.extras.creaper.commands.messaging.RemoveTopic.groovy Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
def topicAddress = null

if (messagingActivemq) {
    topicAddress = messagingActivemq.server.'jms-topic'
} else if ( messagingHornetq) {
    topicAddress = messagingHornetq.'hornetq-server'.'jms-destinations'.'jms-topic'
}
if (!topicAddress) {
    throw new IllegalStateException("Neither ActiveMQ nor HornetQ messaging subsystem exists in configuration")
}

def topic = topicAddress.find { it.@name == topicName }
if (!topic) {
    throw new IllegalStateException("Can't remove topic $topicName as it does not exist in the configuration")
}

topic.replaceNode {}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy