[ 
https://issues.apache.org/jira/browse/PROTON-244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13582969#comment-13582969
 ] 

Jan-Helge Bergesen commented on PROTON-244:
-------------------------------------------

Certainly!

The actual usecase I've got is bridging events from a legacy system into new 
infrastructure using Camel.
The legacy system isn't too fuzzy about setting all headers and stuff..

Heres a somewhat obscured dump of the inbound message (from Glassfish/OpenMQ) 
that is bridged into ActiveMQ:

07:36:32.207 [Camel (wms) thread #0 - JmsConsumer[MyTopicDestination]] DEBUG 
o.a.c.c.jms.EndpointMessageListener - 
Endpoint[jmsapps01://topic:MyTopicDestination?clientId=jms-bridge-wms-transaction&durableSubscriptionName=jms-bridge-wms-transaction]
 consumer received JMS message: 
Class:                  com.sun.messaging.jmq.jmsclient.MapMessageImpl
getJMSMessageID():      ID:4761-10.0.63.37(87:9a:32:dc:6b:a2)-1-1361428595454
getJMSTimestamp():      1361428595454
getJMSCorrelationID():  null
JMSReplyTo:             null
JMSDestination:         MyTopicDestination
getJMSDeliveryMode():   PERSISTENT
getJMSRedelivered():    false
getJMSType():           null
getJMSExpiration():     0
getJMSPriority():       4
Properties:             {eventType=InternalEventType, changedReason=My 3217454 
from P1666 to L1. Attrib:, changedBy=jhb, changedWhen=Thu Feb 21 07:36:35 CET 
2013, itemId=795175}
07:36:32.285 [Camel (wms) thread #0 - JmsConsumer[MyTopicDestination]] DEBUG 
wms-transaction-bridge-to-activemq - From apps01 {JMSRedelivered=false, 
JMSReplyTo=null, JMSDeliveryMode=2, changedWhen=Thu Feb 21 07:36:35 CET 2013, 
JMSCorrelationID=null, JMSPriority=4, changedReason=My 3217454 from P1666 to 
L1. Attrib:, JMSExpiration=0, JMSDestination=Sun Java System MQ Destination
getName():              MyTopicDestination
Class:                  com.sun.messaging.Topic
getVERSION():           3.0
isReadonly():           false
getProperties():        {imqDestinationName=MyTopicDestination, 
imqDestinationDescription=A Description for the Destination Object}, 
JMSTimestamp=1361428595454, itemId=795175, changedBy=jhb, 
eventType=InternalEventType, JMSType=null, 
JMSMessageID=ID:4761-10.0.63.37(87:9a:32:dc:6b:a2)-1-1361428595454, 
breadcrumbId=ID:4761-10.0.63.37(87:9a:32:dc:6b:a2)-1-1361428595454, 
JMSXGroupID=null}


Letting Camel set the JMSType header before forwarding it solved my particular 
hurdle, but alas I imagine the legacy system I'm looking at isn't that unique 
in it's header processing.. ;-)
                
> NPE in org/apache/qpid/proton/jms/InboundTransformer when connecting 
> qpid-client to qpid-proton in ActiveMQ
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: PROTON-244
>                 URL: https://issues.apache.org/jira/browse/PROTON-244
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-j
>    Affects Versions: 0.3
>            Reporter: Jan-Helge Bergesen
>            Assignee: Hiram Chirino
>              Labels: robustness
>         Attachments: PROTON-244.logexcerpt.txt
>
>
> Connecting a ConnectionFactory from qpid-amqp-1-0-client-jms version 0.20 to 
> ActiveMQ 5.8.0, yields NPE:
> org.apache.activemq.transport.amqp.AmqpProtocolException: Could not process 
> AMQP commands
>         at 
> org.apache.activemq.transport.amqp.AmqpProtocolConverter.onFrame(AmqpProtocolConverter.java:245)
>         at 
> org.apache.activemq.transport.amqp.AmqpProtocolConverter.onAMQPData(AmqpProtocolConverter.java:151)
>         at 
> org.apache.activemq.transport.amqp.AmqpTransportFilter.onCommand(AmqpTransportFilter.java:94)
>         at 
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>         at 
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
>         at 
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.NullPointerException
>         at 
> org.apache.qpid.proton.jms.InboundTransformer.populateMessage(InboundTransformer.java:146)
>         at 
> org.apache.qpid.proton.jms.AMQPNativeInboundTransformer.transform(AMQPNativeInboundTransformer.java:37)
>         at 
> org.apache.activemq.transport.amqp.AmqpProtocolConverter$ProducerContext.onMessage(AmqpProtocolConverter.java:454)
>         at 
> org.apache.activemq.transport.amqp.AmqpProtocolConverter$BaseProducerContext.onDelivery(AmqpProtocolConverter.java:435)
>         at 
> org.apache.activemq.transport.amqp.AmqpProtocolConverter.onFrame(AmqpProtocolConverter.java:215)
>         ... 6 more
> Looking at 
> https://github.com/apache/qpid-proton/blob/trunk/proton-j/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/InboundTransformer.java#L146
> It would seems that qpid-amqp-1-0-client-jms sends a message with header 
> "x-opt-jms-type" with value NULL.
> This might very well be an invalid combination of client/broker setup -- 
> however, the proton-jms code could possibly benefit from utilizing 
> String.valueOf(..) instead of getValue().toString() (or similar) :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to