summaryrefslogtreecommitdiff
path: root/java/client/src
diff options
context:
space:
mode:
authorArnaud Simon <arnaudsimon@apache.org>2008-01-17 14:06:17 +0000
committerArnaud Simon <arnaudsimon@apache.org>2008-01-17 14:06:17 +0000
commit81a883551f014bb89018fe96848f688b7e0378d5 (patch)
treeb069e9aaa358b5f727c088916aca2452977afd7c /java/client/src
parentdbaa0a5e8348ef285d7737bf6e602b80842a9698 (diff)
downloadqpid-python-81a883551f014bb89018fe96848f688b7e0378d5.tar.gz
see qpid-743
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@612821 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src')
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java20
1 files changed, 16 insertions, 4 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java b/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
index e1a3d15a78..80b63c75c8 100644
--- a/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
+++ b/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
@@ -169,9 +169,22 @@ public class BasicMessageConsumer_0_10 extends BasicMessageConsumer<Struct[], By
int channelId = getSession().getChannelId();
long deliveryId = message.getMessageTransferId();
String consumerTag = getConsumerTag().toString();
- AMQShortString exchange = new AMQShortString(message.getDeliveryProperties().getExchange());
- AMQShortString routingKey = new AMQShortString(message.getDeliveryProperties().getRoutingKey());
- boolean redelivered = message.getDeliveryProperties().getRedelivered();
+ AMQShortString exchange;
+ AMQShortString routingKey;
+ boolean redelivered = false;
+ Struct[] headers = {message.getMessageProperties(), message.getDeliveryProperties()};
+ if( message.getDeliveryProperties() != null )
+ {
+ exchange = new AMQShortString(message.getDeliveryProperties().getExchange());
+ routingKey = new AMQShortString(message.getDeliveryProperties().getRoutingKey());
+ redelivered = message.getDeliveryProperties().getRedelivered();
+ }
+ else
+ {
+ exchange = new AMQShortString("");
+ routingKey = new AMQShortString("");
+ headers[1] = new DeliveryProperties();
+ }
UnprocessedMessage_0_10 newMessage =
new UnprocessedMessage_0_10(channelId, deliveryId, consumerTag, exchange, routingKey, redelivered);
try
@@ -182,7 +195,6 @@ public class BasicMessageConsumer_0_10 extends BasicMessageConsumer<Struct[], By
{
getSession().getAMQConnection().exceptionReceived(e);
}
- Struct[] headers = {message.getMessageProperties(), message.getDeliveryProperties()};
// if there is a replyto destination then we need to request the exchange info
ReplyTo replyTo = message.getMessageProperties().getReplyTo();
if (replyTo != null && replyTo.getExchangeName() != null && !replyTo.getExchangeName().equals(""))