public class AmqpDistribution extends Object implements DistributionHandler
Modifier and Type | Field and Description |
---|---|
private String |
amqpQueue |
private boolean |
amqpQueueAutoDelete |
private boolean |
amqpQueueDurable |
private boolean |
amqpQueueExclusive |
private boolean |
amqpQueuePassive |
private LinkedHashMap<String,com.rabbitmq.client.Channel> |
channels |
private List<String> |
connectionNames |
private long |
lastUpdate |
private static Logger |
logger |
private static String |
QUEUE_AUTODELETE_PROP
True if we are declaring an autodelete queue (server will delete it when no longer in use).
|
private static String |
QUEUE_DURABLE_PROP
True if we are declaring a durable queue (the queue will survive a server restart).
|
private static String |
QUEUE_EXCLUSIVE_PROP
True if we are declaring an exclusive queue (restricted to this connection).
|
private static String |
QUEUE_NAME_PROP
the name of the queue to declare
|
private static String |
QUEUE_PASSIVE_PROP
True if we are declaring a queue passively; i.e., check if it exists.
|
private static String |
ROUTING_PROP |
private static String |
UPDATE_PERIOD_PROP |
private long |
updatePeriod |
Constructor and Description |
---|
AmqpDistribution() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this handler and releases any system resources associated to it.
|
void |
distribute(Message message)
Distributes the given message outside of the JORAM server.
|
void |
init(Properties properties,
boolean firstTime)
Configures the handler with the given properties.
|
private static final Logger logger
private static final String QUEUE_NAME_PROP
private static final String QUEUE_PASSIVE_PROP
private static final String QUEUE_EXCLUSIVE_PROP
private static final String QUEUE_DURABLE_PROP
private static final String QUEUE_AUTODELETE_PROP
private static final String UPDATE_PERIOD_PROP
private static final String ROUTING_PROP
private LinkedHashMap<String,com.rabbitmq.client.Channel> channels
private String amqpQueue
private boolean amqpQueuePassive
private boolean amqpQueueExclusive
private boolean amqpQueueDurable
private boolean amqpQueueAutoDelete
private long lastUpdate
private long updatePeriod
public void init(Properties properties, boolean firstTime)
DistributionHandler
init
in interface DistributionHandler
properties
- The initial set of properties.public void distribute(Message message) throws Exception
DistributionHandler
distribute
in interface DistributionHandler
message
- the message to distributeException
- if the message could not be distributed. The message will
be forwarded to a DMQ, if any.public void close()
DistributionHandler
close
in interface DistributionHandler
Copyright © 2022 ScalAgent D.T.. All rights reserved.