public class RabbitMQConsumer extends Object implements MessageConsumer
| Constructor and Description |
|---|
RabbitMQConsumer(RabbitMQStore store) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
ack()
Acknowledges the last message received so that it will be removed from the store.
|
boolean |
cleanup()
Cleans up this message consumer
|
com.rabbitmq.client.Connection |
getConnection() |
String |
getId()
Returns the ID of this Message consumer.
|
boolean |
isAlive()
Check availability of connectivity with the message store
|
MessageContext |
receive()
Receives the next message from the store.
|
boolean |
setChannel() |
RabbitMQConsumer |
setConnection(com.rabbitmq.client.Connection connection) |
void |
setId(int id)
Sets the ID of this message consumer.
|
void |
setQueueName(String queueName) |
public RabbitMQConsumer(RabbitMQStore store)
public MessageContext receive()
MessageConsumerreceive in interface MessageConsumerpublic boolean ack()
MessageConsumerack in interface MessageConsumertrue if the acknowledgement is successful. false otherwise.public boolean cleanup()
MessageConsumercleanup in interface MessageConsumertrue if cleanup is successful, false otherwise.public boolean isAlive()
MessageConsumerisAlive in interface MessageConsumertrue if connection available, false otherwise.public RabbitMQConsumer setConnection(com.rabbitmq.client.Connection connection)
public void setQueueName(String queueName)
public boolean setChannel()
public void setId(int id)
MessageConsumersetId in interface MessageConsumerid - IDpublic String getId()
MessageConsumergetId in interface MessageConsumerpublic com.rabbitmq.client.Connection getConnection()
Copyright © 2005–2019 Apache Software Foundation. All rights reserved.