mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@658127 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b9797bc618
commit
90c8ded771
|
@ -424,6 +424,11 @@ public class Queue extends BaseDestination implements Task {
|
|||
final ConnectionContext context = producerExchange.getConnectionContext();
|
||||
synchronized (sendLock) {
|
||||
if (store != null && message.isPersistent()) {
|
||||
if (isProducerFlowControl() && context.isProducerFlowControl() ) {
|
||||
if (systemUsage.isSendFailIfNoSpace() && systemUsage.getStoreUsage().isFull()) {
|
||||
throw new javax.jms.ResourceAllocationException("Usage Manager Store is Full");
|
||||
}
|
||||
}
|
||||
while (!systemUsage.getStoreUsage().waitForSpace(1000)) {
|
||||
if (context.getStopping().get()) {
|
||||
throw new IOException(
|
||||
|
|
|
@ -385,6 +385,11 @@ public class Topic extends BaseDestination implements Task{
|
|||
|
||||
if (topicStore != null && message.isPersistent()
|
||||
&& !canOptimizeOutPersistence()) {
|
||||
if (isProducerFlowControl() && context.isProducerFlowControl() ) {
|
||||
if (systemUsage.isSendFailIfNoSpace() && systemUsage.getStoreUsage().isFull()) {
|
||||
throw new javax.jms.ResourceAllocationException("Usage Manager Store is Full");
|
||||
}
|
||||
}
|
||||
while (!systemUsage.getStoreUsage().waitForSpace(1000)) {
|
||||
if (context.getStopping().get()) {
|
||||
throw new IOException("Connection closed, send aborted.");
|
||||
|
|
Loading…
Reference in New Issue