You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rob Godfrey (JIRA)" <qp...@incubator.apache.org> on 2008/06/03 16:12:45 UTC

[jira] Created: (QPID-1118) [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation

[Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation
--------------------------------------------------------------------------------------------------

                 Key: QPID-1118
                 URL: https://issues.apache.org/jira/browse/QPID-1118
             Project: Qpid
          Issue Type: Bug
          Components: Java Client
    Affects Versions: M3
            Reporter: Rob Godfrey
             Fix For: M3


In the M2.x client the destination type (Queue/Topic/Other) is set as a property on the message so that the JMSDestination can be correctly recreated by the receiver of the message.
AbstractJMSMessage still seems to rely on this property to be created correctly:


    protected AbstractJMSMessage(long deliveryTag, BasicContentHeaderProperties contentHeader, AMQShortString exchange,
        AMQShortString routingKey, ByteBuffer data) throws AMQException
    {
        this(contentHeader, deliveryTag);

        Integer type = contentHeader.getHeaders().getInteger(CustomJMSXProperty.JMS_QPID_DESTTYPE.getShortStringName());

        AMQDestination dest;

        if (AMQDestination.QUEUE_TYPE.equals(type))
        {
            dest = new AMQQueue(exchange, routingKey, routingKey);
        }
        else if (AMQDestination.TOPIC_TYPE.equals(type))
        {
            dest = new AMQTopic(exchange, routingKey, null);
        }
        else
        {
            dest = new AMQUndefinedDestination(exchange, routingKey, null);
        }
        // Destination dest = AMQDestination.createDestination(url);
        setJMSDestination(dest);


however the code which sets the destination type no longer seems to be present in the send implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (QPID-1118) [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation

Posted by "Rob Godfrey (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12657552#action_12657552 ] 

Rob Godfrey commented on QPID-1118:
-----------------------------------

Arnaud... are you expecting me to review the change?  Could you point me at the commit that you believe fixed this... and then change the state (I only look for JIRAs awaiting review)...

Cheers.
Rob

> [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation
> --------------------------------------------------------------------------------------------------
>
>                 Key: QPID-1118
>                 URL: https://issues.apache.org/jira/browse/QPID-1118
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M3
>            Reporter: Rob Godfrey
>            Assignee: Rob Godfrey
>             Fix For: M4
>
>
> In the M2.x client the destination type (Queue/Topic/Other) is set as a property on the message so that the JMSDestination can be correctly recreated by the receiver of the message.
> AbstractJMSMessage still seems to rely on this property to be created correctly:
>     protected AbstractJMSMessage(long deliveryTag, BasicContentHeaderProperties contentHeader, AMQShortString exchange,
>         AMQShortString routingKey, ByteBuffer data) throws AMQException
>     {
>         this(contentHeader, deliveryTag);
>         Integer type = contentHeader.getHeaders().getInteger(CustomJMSXProperty.JMS_QPID_DESTTYPE.getShortStringName());
>         AMQDestination dest;
>         if (AMQDestination.QUEUE_TYPE.equals(type))
>         {
>             dest = new AMQQueue(exchange, routingKey, routingKey);
>         }
>         else if (AMQDestination.TOPIC_TYPE.equals(type))
>         {
>             dest = new AMQTopic(exchange, routingKey, null);
>         }
>         else
>         {
>             dest = new AMQUndefinedDestination(exchange, routingKey, null);
>         }
>         // Destination dest = AMQDestination.createDestination(url);
>         setJMSDestination(dest);
> however the code which sets the destination type no longer seems to be present in the send implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (QPID-1118) [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation

Posted by "Aidan Skinner (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aidan Skinner reassigned QPID-1118:
-----------------------------------

    Assignee: Arnaud Simon

> [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation
> --------------------------------------------------------------------------------------------------
>
>                 Key: QPID-1118
>                 URL: https://issues.apache.org/jira/browse/QPID-1118
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M3
>            Reporter: Rob Godfrey
>            Assignee: Arnaud Simon
>             Fix For: M3
>
>
> In the M2.x client the destination type (Queue/Topic/Other) is set as a property on the message so that the JMSDestination can be correctly recreated by the receiver of the message.
> AbstractJMSMessage still seems to rely on this property to be created correctly:
>     protected AbstractJMSMessage(long deliveryTag, BasicContentHeaderProperties contentHeader, AMQShortString exchange,
>         AMQShortString routingKey, ByteBuffer data) throws AMQException
>     {
>         this(contentHeader, deliveryTag);
>         Integer type = contentHeader.getHeaders().getInteger(CustomJMSXProperty.JMS_QPID_DESTTYPE.getShortStringName());
>         AMQDestination dest;
>         if (AMQDestination.QUEUE_TYPE.equals(type))
>         {
>             dest = new AMQQueue(exchange, routingKey, routingKey);
>         }
>         else if (AMQDestination.TOPIC_TYPE.equals(type))
>         {
>             dest = new AMQTopic(exchange, routingKey, null);
>         }
>         else
>         {
>             dest = new AMQUndefinedDestination(exchange, routingKey, null);
>         }
>         // Destination dest = AMQDestination.createDestination(url);
>         setJMSDestination(dest);
> however the code which sets the destination type no longer seems to be present in the send implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (QPID-1118) [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation

Posted by "Arnaud Simon (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arnaud Simon reassigned QPID-1118:
----------------------------------

    Assignee: Rob Godfrey  (was: Arnaud Simon)

I believe this is fixed.

> [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation
> --------------------------------------------------------------------------------------------------
>
>                 Key: QPID-1118
>                 URL: https://issues.apache.org/jira/browse/QPID-1118
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M3
>            Reporter: Rob Godfrey
>            Assignee: Rob Godfrey
>             Fix For: M4
>
>
> In the M2.x client the destination type (Queue/Topic/Other) is set as a property on the message so that the JMSDestination can be correctly recreated by the receiver of the message.
> AbstractJMSMessage still seems to rely on this property to be created correctly:
>     protected AbstractJMSMessage(long deliveryTag, BasicContentHeaderProperties contentHeader, AMQShortString exchange,
>         AMQShortString routingKey, ByteBuffer data) throws AMQException
>     {
>         this(contentHeader, deliveryTag);
>         Integer type = contentHeader.getHeaders().getInteger(CustomJMSXProperty.JMS_QPID_DESTTYPE.getShortStringName());
>         AMQDestination dest;
>         if (AMQDestination.QUEUE_TYPE.equals(type))
>         {
>             dest = new AMQQueue(exchange, routingKey, routingKey);
>         }
>         else if (AMQDestination.TOPIC_TYPE.equals(type))
>         {
>             dest = new AMQTopic(exchange, routingKey, null);
>         }
>         else
>         {
>             dest = new AMQUndefinedDestination(exchange, routingKey, null);
>         }
>         // Destination dest = AMQDestination.createDestination(url);
>         setJMSDestination(dest);
> however the code which sets the destination type no longer seems to be present in the send implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (QPID-1118) [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation

Posted by "Rob Godfrey (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Godfrey reassigned QPID-1118:
---------------------------------

    Assignee: Arnaud Simon  (was: Rob Godfrey)

> [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation
> --------------------------------------------------------------------------------------------------
>
>                 Key: QPID-1118
>                 URL: https://issues.apache.org/jira/browse/QPID-1118
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M3
>            Reporter: Rob Godfrey
>            Assignee: Arnaud Simon
>             Fix For: M4
>
>
> In the M2.x client the destination type (Queue/Topic/Other) is set as a property on the message so that the JMSDestination can be correctly recreated by the receiver of the message.
> AbstractJMSMessage still seems to rely on this property to be created correctly:
>     protected AbstractJMSMessage(long deliveryTag, BasicContentHeaderProperties contentHeader, AMQShortString exchange,
>         AMQShortString routingKey, ByteBuffer data) throws AMQException
>     {
>         this(contentHeader, deliveryTag);
>         Integer type = contentHeader.getHeaders().getInteger(CustomJMSXProperty.JMS_QPID_DESTTYPE.getShortStringName());
>         AMQDestination dest;
>         if (AMQDestination.QUEUE_TYPE.equals(type))
>         {
>             dest = new AMQQueue(exchange, routingKey, routingKey);
>         }
>         else if (AMQDestination.TOPIC_TYPE.equals(type))
>         {
>             dest = new AMQTopic(exchange, routingKey, null);
>         }
>         else
>         {
>             dest = new AMQUndefinedDestination(exchange, routingKey, null);
>         }
>         // Destination dest = AMQDestination.createDestination(url);
>         setJMSDestination(dest);
> however the code which sets the destination type no longer seems to be present in the send implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (QPID-1118) [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation

Posted by "Rob Godfrey (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Godfrey resolved QPID-1118.
-------------------------------

    Resolution: Fixed

OK - found it as part of r684036

> [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation
> --------------------------------------------------------------------------------------------------
>
>                 Key: QPID-1118
>                 URL: https://issues.apache.org/jira/browse/QPID-1118
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M3
>            Reporter: Rob Godfrey
>            Assignee: Arnaud Simon
>             Fix For: M4
>
>
> In the M2.x client the destination type (Queue/Topic/Other) is set as a property on the message so that the JMSDestination can be correctly recreated by the receiver of the message.
> AbstractJMSMessage still seems to rely on this property to be created correctly:
>     protected AbstractJMSMessage(long deliveryTag, BasicContentHeaderProperties contentHeader, AMQShortString exchange,
>         AMQShortString routingKey, ByteBuffer data) throws AMQException
>     {
>         this(contentHeader, deliveryTag);
>         Integer type = contentHeader.getHeaders().getInteger(CustomJMSXProperty.JMS_QPID_DESTTYPE.getShortStringName());
>         AMQDestination dest;
>         if (AMQDestination.QUEUE_TYPE.equals(type))
>         {
>             dest = new AMQQueue(exchange, routingKey, routingKey);
>         }
>         else if (AMQDestination.TOPIC_TYPE.equals(type))
>         {
>             dest = new AMQTopic(exchange, routingKey, null);
>         }
>         else
>         {
>             dest = new AMQUndefinedDestination(exchange, routingKey, null);
>         }
>         // Destination dest = AMQDestination.createDestination(url);
>         setJMSDestination(dest);
> however the code which sets the destination type no longer seems to be present in the send implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (QPID-1118) [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation

Posted by "Arnaud Simon (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602618#action_12602618 ] 

Arnaud Simon commented on QPID-1118:
------------------------------------

It appears that the JMS destination type is set in BasicMessageConsumer:
 void postDeliver(AbstractJMSMessage msg) throws JMSException
    {
        msg.setJMSDestination(_destination);
  .....

Unless the broker requires the type to be set we should be able to leave without setting the type. 

> [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation
> --------------------------------------------------------------------------------------------------
>
>                 Key: QPID-1118
>                 URL: https://issues.apache.org/jira/browse/QPID-1118
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M3
>            Reporter: Rob Godfrey
>             Fix For: M3
>
>
> In the M2.x client the destination type (Queue/Topic/Other) is set as a property on the message so that the JMSDestination can be correctly recreated by the receiver of the message.
> AbstractJMSMessage still seems to rely on this property to be created correctly:
>     protected AbstractJMSMessage(long deliveryTag, BasicContentHeaderProperties contentHeader, AMQShortString exchange,
>         AMQShortString routingKey, ByteBuffer data) throws AMQException
>     {
>         this(contentHeader, deliveryTag);
>         Integer type = contentHeader.getHeaders().getInteger(CustomJMSXProperty.JMS_QPID_DESTTYPE.getShortStringName());
>         AMQDestination dest;
>         if (AMQDestination.QUEUE_TYPE.equals(type))
>         {
>             dest = new AMQQueue(exchange, routingKey, routingKey);
>         }
>         else if (AMQDestination.TOPIC_TYPE.equals(type))
>         {
>             dest = new AMQTopic(exchange, routingKey, null);
>         }
>         else
>         {
>             dest = new AMQUndefinedDestination(exchange, routingKey, null);
>         }
>         // Destination dest = AMQDestination.createDestination(url);
>         setJMSDestination(dest);
> however the code which sets the destination type no longer seems to be present in the send implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (QPID-1118) [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation

Posted by "Rob Godfrey (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602628#action_12602628 ] 

Rob Godfrey commented on QPID-1118:
-----------------------------------

I don't think the new implementation is correct.  It is setting the Destination to the queue/topic that the consumer has been created for that is not the same as the destination that the message was sent to in particular if you have a topic like nyse.# that you subscribe to then the topics that each message have been sent to should be different

One approach might be to use the type from the Destination of the consumer, but construct the Destination from the routing-key / exchange from the message.

> [Java Client] JMS Destination Type no longer being set, but still relied upon for Message Creation
> --------------------------------------------------------------------------------------------------
>
>                 Key: QPID-1118
>                 URL: https://issues.apache.org/jira/browse/QPID-1118
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M3
>            Reporter: Rob Godfrey
>             Fix For: M3
>
>
> In the M2.x client the destination type (Queue/Topic/Other) is set as a property on the message so that the JMSDestination can be correctly recreated by the receiver of the message.
> AbstractJMSMessage still seems to rely on this property to be created correctly:
>     protected AbstractJMSMessage(long deliveryTag, BasicContentHeaderProperties contentHeader, AMQShortString exchange,
>         AMQShortString routingKey, ByteBuffer data) throws AMQException
>     {
>         this(contentHeader, deliveryTag);
>         Integer type = contentHeader.getHeaders().getInteger(CustomJMSXProperty.JMS_QPID_DESTTYPE.getShortStringName());
>         AMQDestination dest;
>         if (AMQDestination.QUEUE_TYPE.equals(type))
>         {
>             dest = new AMQQueue(exchange, routingKey, routingKey);
>         }
>         else if (AMQDestination.TOPIC_TYPE.equals(type))
>         {
>             dest = new AMQTopic(exchange, routingKey, null);
>         }
>         else
>         {
>             dest = new AMQUndefinedDestination(exchange, routingKey, null);
>         }
>         // Destination dest = AMQDestination.createDestination(url);
>         setJMSDestination(dest);
> however the code which sets the destination type no longer seems to be present in the send implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.