Package interlok.rabbitmq
Class ExplicitExchange
java.lang.Object
interlok.rabbitmq.ExplicitExchange
- All Implemented Interfaces:
Declaration.ExchangeDeclaration
@ComponentProfile(summary="Explicitly declare a RabbitMQ Exchange",
since="4.3.0")
public class ExplicitExchange
extends Object
implements Declaration.ExchangeDeclaration
Declaring an explicit exchange.
Depending on your RabbitMQ configuration you may wish to explicitly declare an exchange that is not the 'default exchange' when producing messages.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeclare(com.rabbitmq.client.Channel ch) Declare the exchange.Whether or not the exchange should survive a server restart.getName()The exchange name.com.rabbitmq.client.BuiltinExchangeTypegetType()The exchange type.name()The name of the exchange that was declared.voidsetDurable(Boolean durable) Whether or not the exchange should survive a server restart.voidThe exchange name.voidsetType(com.rabbitmq.client.BuiltinExchangeType type) The exchange type.withType(com.rabbitmq.client.BuiltinExchangeType t)
-
Constructor Details
-
ExplicitExchange
public ExplicitExchange()
-
-
Method Details
-
declare
Description copied from interface:Declaration.ExchangeDeclarationDeclare the exchange.- Specified by:
declarein interfaceDeclaration.ExchangeDeclaration- Parameters:
ch- the channel to use to declare the exchange.- Throws:
Exception
-
withName
-
withType
-
withDurable
-
name
Description copied from interface:Declaration.ExchangeDeclarationThe name of the exchange that was declared.- Specified by:
namein interfaceDeclaration.ExchangeDeclaration
-
setType
public void setType(com.rabbitmq.client.BuiltinExchangeType type) The exchange type. -
getType
public com.rabbitmq.client.BuiltinExchangeType getType()The exchange type. -
getName
The exchange name. -
setName
The exchange name. -
getDurable
Whether or not the exchange should survive a server restart. -
setDurable
Whether or not the exchange should survive a server restart.
-