public class RabbitMQConsumer extends java.lang.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() |
java.lang.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(java.lang.String queueName) |
public RabbitMQConsumer(RabbitMQStore store)
public MessageContext receive()
MessageConsumer
receive
in interface MessageConsumer
public boolean ack()
MessageConsumer
ack
in interface MessageConsumer
true
if the acknowledgement is successful. false
otherwise.public boolean cleanup()
MessageConsumer
cleanup
in interface MessageConsumer
true
if cleanup is successful, false
otherwise.public boolean isAlive()
MessageConsumer
isAlive
in interface MessageConsumer
true
if connection available, false
otherwise.public RabbitMQConsumer setConnection(com.rabbitmq.client.Connection connection)
public void setQueueName(java.lang.String queueName)
public boolean setChannel()
public void setId(int id)
MessageConsumer
setId
in interface MessageConsumer
id
- IDpublic java.lang.String getId()
MessageConsumer
getId
in interface MessageConsumer
public com.rabbitmq.client.Connection getConnection()
Copyright © 2005-2020 Apache Software Foundation. All Rights Reserved.