
io.latent.storm.rabbitmq.config.ProducerConfigBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of storm-rabbitmq Show documentation
Show all versions of storm-rabbitmq Show documentation
A library of tools for interacting with RabbitMQ from Storm.
package io.latent.storm.rabbitmq.config;
public class ProducerConfigBuilder
{
private ConnectionConfig connectionConfig;
private String exchangeName;
private String contentType;
private String contentEncoding;
private boolean persistent = false;
public ProducerConfigBuilder()
{
}
public ProducerConfigBuilder connection(ConnectionConfig connection) {
this.connectionConfig = connection;
return this;
}
public ProducerConfigBuilder exchange(String exchange) {
this.exchangeName = exchange;
return this;
}
public ProducerConfigBuilder contentType(String contentType) {
this.contentType = contentType;
return this;
}
public ProducerConfigBuilder contentEncoding(String contentEncoding) {
this.contentEncoding = contentEncoding;
return this;
}
public ProducerConfigBuilder persistent() {
this.persistent = true;
return this;
}
public ProducerConfig build()
{
return new ProducerConfig(connectionConfig, exchangeName, contentType, contentEncoding, persistent);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy