Package io.gridgo.connector.rabbitmq
Class RabbitMQQueueConfig
- java.lang.Object
-
- io.gridgo.connector.rabbitmq.RabbitMQQueueConfig
-
public class RabbitMQQueueConfig extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.Collection<java.lang.String>EXCHANGE_TYPES
-
Constructor Summary
Constructors Constructor Description RabbitMQQueueConfig()RabbitMQQueueConfig(io.gridgo.bean.BObject sourceConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.lang.StringgetDefaultRoutingKey()java.lang.StringgetExchangeName()exchange name, default is nameless rabbitMQ default exchangejava.lang.StringgetExchangeType()exchange tpe, accept 4 values: "direct", "fanout", "topic", "headers"java.lang.StringgetQueueName()affect when the exchangeName is blank, create queue on default nameless exchangejava.util.List<java.lang.String>getRoutingKeys()affect on consumer, bind queue to all the configured routing keysinthashCode()booleanisAckOnFail()if true, consumer send ack event the process is failedbooleanisAutoAck()only affect on consumer, set autoAck value in channel.basicConsumebooleanisAutoDelete()set auto delete when declaring queuebooleanisDurable()is queue durable?booleanisExclusive()make the queue visible only on the current connectionbooleanisMultipleAck()affect on consumer only, the second arg in channel.basicAck methodbooleanisRpc()auto create response queue for producer, not affect on consumerRabbitMQQueueConfigmakeCopy()voidreadFromBObject(io.gridgo.bean.BObject sourceConfig)voidsetAckOnFail(boolean ackOnFail)if true, consumer send ack event the process is failedvoidsetAutoAck(boolean autoAck)only affect on consumer, set autoAck value in channel.basicConsumevoidsetAutoDelete(boolean autoDelete)set auto delete when declaring queuevoidsetDurable(boolean durable)is queue durable?voidsetExchangeName(java.lang.String exchangeName)exchange name, default is nameless rabbitMQ default exchangevoidsetExchangeType(java.lang.String exchangeType)exchange tpe, accept 4 values: "direct", "fanout", "topic", "headers"voidsetExclusive(boolean exclusive)make the queue visible only on the current connectionvoidsetMultipleAck(boolean multipleAck)affect on consumer only, the second arg in channel.basicAck methodvoidsetQueueName(java.lang.String queueName)affect when the exchangeName is blank, create queue on default nameless exchangevoidsetRpc(boolean rpc)auto create response queue for producer, not affect on consumerjava.lang.StringtoString()
-
-
-
Method Detail
-
getDefaultRoutingKey
public java.lang.String getDefaultRoutingKey()
- Returns:
- the queueName if exchangeName is blank, otherwise return the first element found in list rountingKeys. If the list routingKeys is empty, return null;
-
makeCopy
public RabbitMQQueueConfig makeCopy()
-
readFromBObject
public void readFromBObject(io.gridgo.bean.BObject sourceConfig)
-
getExchangeName
public java.lang.String getExchangeName()
exchange name, default is nameless rabbitMQ default exchange
-
getExchangeType
public java.lang.String getExchangeType()
exchange tpe, accept 4 values: "direct", "fanout", "topic", "headers"
-
getQueueName
public java.lang.String getQueueName()
affect when the exchangeName is blank, create queue on default nameless exchange
-
isDurable
public boolean isDurable()
is queue durable?
-
isExclusive
public boolean isExclusive()
make the queue visible only on the current connection
-
isAutoDelete
public boolean isAutoDelete()
set auto delete when declaring queue
-
isRpc
public boolean isRpc()
auto create response queue for producer, not affect on consumer
-
isAutoAck
public boolean isAutoAck()
only affect on consumer, set autoAck value in channel.basicConsume
-
isMultipleAck
public boolean isMultipleAck()
affect on consumer only, the second arg in channel.basicAck method
-
isAckOnFail
public boolean isAckOnFail()
if true, consumer send ack event the process is failed
-
getRoutingKeys
public java.util.List<java.lang.String> getRoutingKeys()
affect on consumer, bind queue to all the configured routing keys
-
setExchangeName
public void setExchangeName(java.lang.String exchangeName)
exchange name, default is nameless rabbitMQ default exchange
-
setExchangeType
public void setExchangeType(java.lang.String exchangeType)
exchange tpe, accept 4 values: "direct", "fanout", "topic", "headers"
-
setQueueName
public void setQueueName(java.lang.String queueName)
affect when the exchangeName is blank, create queue on default nameless exchange
-
setDurable
public void setDurable(boolean durable)
is queue durable?
-
setExclusive
public void setExclusive(boolean exclusive)
make the queue visible only on the current connection
-
setAutoDelete
public void setAutoDelete(boolean autoDelete)
set auto delete when declaring queue
-
setRpc
public void setRpc(boolean rpc)
auto create response queue for producer, not affect on consumer
-
setAutoAck
public void setAutoAck(boolean autoAck)
only affect on consumer, set autoAck value in channel.basicConsume
-
setMultipleAck
public void setMultipleAck(boolean multipleAck)
affect on consumer only, the second arg in channel.basicAck method
-
setAckOnFail
public void setAckOnFail(boolean ackOnFail)
if true, consumer send ack event the process is failed
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-