|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.amqp.rabbit.listener.BlockingQueueConsumer
public class BlockingQueueConsumer
Specialized consumer encapsulating knowledge of the broker connections and having its own lifecycle (start and stop).
| Constructor Summary | |
|---|---|
BlockingQueueConsumer(ConnectionFactory connectionFactory,
MessagePropertiesConverter messagePropertiesConverter,
ActiveObjectCounter<BlockingQueueConsumer> activeObjectCounter,
org.springframework.amqp.core.AcknowledgeMode acknowledgeMode,
boolean transactional,
int prefetchCount,
boolean defaultRequeueRejected,
java.lang.String... queues)
Create a consumer. |
|
BlockingQueueConsumer(ConnectionFactory connectionFactory,
MessagePropertiesConverter messagePropertiesConverter,
ActiveObjectCounter<BlockingQueueConsumer> activeObjectCounter,
org.springframework.amqp.core.AcknowledgeMode acknowledgeMode,
boolean transactional,
int prefetchCount,
java.lang.String... queues)
Create a consumer. |
|
| Method Summary | |
|---|---|
boolean |
commitIfNecessary(boolean locallyTransacted)
Perform a commit or message acknowledgement, as appropriate. |
com.rabbitmq.client.Channel |
getChannel()
|
java.lang.String |
getConsumerTag()
|
org.springframework.amqp.core.Message |
nextMessage()
Main application-side API: wait for the next message delivery and return it. |
org.springframework.amqp.core.Message |
nextMessage(long timeout)
Main application-side API: wait for the next message delivery and return it. |
void |
rollbackOnExceptionIfNecessary(java.lang.Throwable ex)
Perform a rollback, handling rollback exceptions properly. |
void |
start()
|
void |
stop()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BlockingQueueConsumer(ConnectionFactory connectionFactory,
MessagePropertiesConverter messagePropertiesConverter,
ActiveObjectCounter<BlockingQueueConsumer> activeObjectCounter,
org.springframework.amqp.core.AcknowledgeMode acknowledgeMode,
boolean transactional,
int prefetchCount,
java.lang.String... queues)
public BlockingQueueConsumer(ConnectionFactory connectionFactory,
MessagePropertiesConverter messagePropertiesConverter,
ActiveObjectCounter<BlockingQueueConsumer> activeObjectCounter,
org.springframework.amqp.core.AcknowledgeMode acknowledgeMode,
boolean transactional,
int prefetchCount,
boolean defaultRequeueRejected,
java.lang.String... queues)
| Method Detail |
|---|
public com.rabbitmq.client.Channel getChannel()
public java.lang.String getConsumerTag()
public org.springframework.amqp.core.Message nextMessage()
throws java.lang.InterruptedException,
com.rabbitmq.client.ShutdownSignalException
java.lang.InterruptedException - if an interrupt is received while waiting
com.rabbitmq.client.ShutdownSignalException - if the connection is shut down while waiting
public org.springframework.amqp.core.Message nextMessage(long timeout)
throws java.lang.InterruptedException,
com.rabbitmq.client.ShutdownSignalException
timeout - timeout in millisecond
java.lang.InterruptedException - if an interrupt is received while waiting
com.rabbitmq.client.ShutdownSignalException - if the connection is shut down while waiting
public void start()
throws org.springframework.amqp.AmqpException
org.springframework.amqp.AmqpExceptionpublic void stop()
public java.lang.String toString()
toString in class java.lang.Object
public void rollbackOnExceptionIfNecessary(java.lang.Throwable ex)
throws java.lang.Exception
ex - the thrown application exception or error
java.lang.Exception - in case of a rollback error
public boolean commitIfNecessary(boolean locallyTransacted)
throws java.io.IOException
locallyTransacted -
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||