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

io.nosqlbench.driver.jms.conn.JmsPulsarConnInfo Maven / Gradle / Ivy

Go to download

A JMS driver for nosqlbench. This provides the ability to inject synthetic data into a pulsar system via JMS 2.0 compatibile APIs. NOTE: this is JMS compatible driver from DataStax that allows using a Pulsar cluster as the potential JMS Destination

There is a newer version: 4.15.97
Show newest version
package io.nosqlbench.driver.jms.conn;

import io.nosqlbench.driver.jms.util.PulsarConfig;

import java.util.Map;

public class JmsPulsarConnInfo extends JmsConnInfo {

    private final String webSvcUrl;
    private final String pulsarSvcUrl;
    private final PulsarConfig extraPulsarConfig;

    public JmsPulsarConnInfo(String jmsProviderType, String webSvcUrl, String pulsarSvcUrl, PulsarConfig pulsarConfig) {
        super(jmsProviderType);

        this.webSvcUrl = webSvcUrl;
        this.pulsarSvcUrl = pulsarSvcUrl;
        this.extraPulsarConfig = pulsarConfig;

        this.addJmsConnConfigItem("webServiceUrl", this.webSvcUrl);
        this.addJmsConnConfigItem("brokerServiceUrl", this.pulsarSvcUrl);

        Map clientCfgMap = this.extraPulsarConfig.getClientConfMap();
        if (!clientCfgMap.isEmpty()) {
            this.addJmsConnConfigItems(clientCfgMap);
        }

        Map producerCfgMap = this.extraPulsarConfig.getProducerConfMap();
        if (!producerCfgMap.isEmpty()) {
            this.addJmsConnConfigItem("producerConfig", producerCfgMap);
        }

        Map consumerCfgMap = this.extraPulsarConfig.getConsumerConfMap();
        if (!consumerCfgMap.isEmpty()) {
            this.addJmsConnConfigItem("consumerConfig", consumerCfgMap);
        }
    }

    public String getWebSvcUrl() { return this.webSvcUrl; }
    public String getPulsarSvcUrl() { return this.pulsarSvcUrl; }
    public PulsarConfig getExtraPulsarConfig() { return this.extraPulsarConfig; }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy