io.quarkus.artemis.jms.runtime.ArtemisJmsRecorder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-artemis-jms Show documentation
Show all versions of quarkus-artemis-jms Show documentation
Use JMS APIs to connect to ActiveMQ Artemis via its native protocol
package io.quarkus.artemis.jms.runtime;
import java.util.function.Supplier;
import javax.jms.ConnectionFactory;
import org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory;
import io.quarkus.artemis.core.runtime.ArtemisRuntimeConfig;
import io.quarkus.runtime.annotations.Recorder;
@Recorder
public class ArtemisJmsRecorder {
public Supplier getConnectionFactorySupplier(ArtemisRuntimeConfig config) {
return new Supplier() {
@Override
public ConnectionFactory get() {
return new ActiveMQJMSConnectionFactory(config.url, config.username.orElse(null), config.password.orElse(null));
}
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy