| }
public void assertReceivedNoConsumersWithReturnedMessage(Message message)
{
JMSException exception = getReceivedException();
AMQNoConsumersException noConsumersException = (AMQNoConsumersException) exception.getLinkedException();
assertNotNull("AMQNoConsumersException should be linked to JMSException", noConsumersException);
Message bounceMessage = (Message) noConsumersException.getUndeliveredMessage();
assertNotNull("Bounced Message is expected", bounceMessage);
try
{
assertEquals("Unexpected message is bounced", message.getJMSMessageID(), bounceMessage.getJMSMessageID());
|
| if (errorCode != AMQConstant.REPLY_SUCCESS)
{
_logger.error("Channel close received with errorCode " + errorCode + ", and reason " + reason);
if (errorCode == AMQConstant.NO_CONSUMERS)
{
throw new AMQNoConsumersException("Error: " + reason, null, null);
}
else if (errorCode == AMQConstant.NO_ROUTE)
{
throw new AMQNoRouteException("Error: " + reason, null, null);
}
|
| _logger.debug("Channel close received with errorCode " + errorCode + ", and reason " + reason);
}
if (errorCode == AMQConstant.NO_CONSUMERS)
{
throw new AMQNoConsumersException("Error: " + reason, null);
}
else if (errorCode == AMQConstant.NO_ROUTE)
{
throw new AMQNoRouteException("Error: " + reason, null);
}
|
| if (errorCode != AMQConstant.REPLY_SUCCESS)
{
_logger.error("Channel close received with errorCode " + errorCode + ", and reason " + reason);
if (errorCode == AMQConstant.NO_CONSUMERS)
{
throw new AMQNoConsumersException("Error: " + reason, null);
}
else if (errorCode == AMQConstant.NO_ROUTE)
{
throw new AMQNoRouteException("Error: " + reason, null);
}
|
| _logger.debug("Channel close received with errorCode " + errorCode + ", and reason " + reason);
}
if (errorCode == AMQConstant.NO_CONSUMERS)
{
throw new AMQNoConsumersException("Error: " + reason, null, null);
}
else if (errorCode == AMQConstant.NO_ROUTE)
{
throw new AMQNoRouteException("Error: " + reason, null, null);
}
|
| _logger.debug("Channel close received with errorCode " + errorCode + ", and reason " + reason);
}
if (errorCode == AMQConstant.NO_CONSUMERS)
{
throw new AMQNoConsumersException("Error: " + reason, null, null);
}
else if (errorCode == AMQConstant.NO_ROUTE)
{
throw new AMQNoRouteException("Error: " + reason, null, null);
}
|
| _logger.debug("Channel close received with errorCode " + errorCode + ", and reason " + reason);
}
if (errorCode == AMQConstant.NO_CONSUMERS)
{
throw new AMQNoConsumersException("Error: " + reason, null, null);
}
else if (errorCode == AMQConstant.NO_ROUTE)
{
throw new AMQNoRouteException("Error: " + reason, null, null);
}
|
| if (errorCode != AMQConstant.REPLY_SUCCESS)
{
_logger.error("Channel close received with errorCode " + errorCode + ", and reason " + reason);
if (errorCode == AMQConstant.NO_CONSUMERS)
{
throw new AMQNoConsumersException("Error: " + reason, null, null);
}
else if (errorCode == AMQConstant.NO_ROUTE)
{
throw new AMQNoRouteException("Error: " + reason, null, null);
}
|
| if (errorCode != AMQConstant.REPLY_SUCCESS)
{
_logger.error("Channel close received with errorCode " + errorCode + ", and reason " + reason);
if (errorCode == AMQConstant.NO_CONSUMERS)
{
throw new AMQNoConsumersException("Error: " + reason, null, null);
}
else if (errorCode == AMQConstant.NO_ROUTE)
{
throw new AMQNoRouteException("Error: " + reason, null, null);
}
|
|
Message message = produceMessage(acknowledgeMode, pubSub, false, true);
JMSException exception = _exceptions.poll(10, TimeUnit.SECONDS);
assertNotNull("JMSException is expected", exception);
AMQNoConsumersException noConsumerException = (AMQNoConsumersException) exception.getLinkedException();
assertNotNull("AMQNoConsumersException should be linked to JMSEXception", noConsumerException);
Message bounceMessage = (Message) noConsumerException.getUndeliveredMessage();
assertNotNull("Bounced Message is expected", bounceMessage);
assertEquals("Unexpected message is bounced", message.getJMSMessageID(), bounceMessage.getJMSMessageID());
}
|
Related Classes of org.apache.qpid.client.AMQNoConsumersException
Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.
|