|
Hi,
First: Camel is very cool, I like that! I used it since 4 weeks with activemq and the lingo library. my question: Are message properties not forwarded with Camel ActiveMQ Component? I want to consume a message filtered with message selectors send from a CamelTemplate to a comsumer queue. But the message properties wasn't send. So the message selector doesn't match. If I use the direct and bean component I can route with headers. I'am not sure, if this is a Camel problem or a ActiveMQ task. the log for the send message: --- [DEBUG] 26 Sep 2007 13:58:47.229 [ActiveMQ Session Task] [org.apache.camel.component.jms.JmsConfiguration$2] - Sending created message [ActiveMQObjectMessage {commandId = 0, responseRequired = false, messageId = null, originalDestination = null, originalTransactionId = null, producerId = null, destination = null, transactionId = null, expiration = 0, timestamp = 0, arrival = 0, correlationId = null, replyTo = null, persistent = false, type = null, priority = 0, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@1ae717f, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {orderer=helmo}, readOnlyProperties = false, readOnlyBody = false, droppable = false}] --- the message in the consumer queue: --- [INFO] 26 Sep 2007 13:58:47.646 [ActiveMQ Session Task] [de.planetic.ConsumerTool] - ActiveMQObjectMessage {commandId = 5, responseRequired = false, messageId = ID:merope-42394-1190807879122-1:2:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:merope-42394-1190807879122-1:2:1:1, destination = queue://servicefacade.return, transactionId = null, expiration = 0, timestamp = 1190807927230, arrival = 0, correlationId = null, replyTo = null, persistent = false, type = null, priority = 0, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@56d149, marshalledProperties = org.apache.activemq.util.ByteSequence@1c634b9, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false} --- Please look at the properties. There are not forwarded to the customer queue. --- The route: from("direct:de.planetic.renderfacade"). filter(body().isInstanceOf(RenderReturnMessage.class)). to("activemq:servicefacade.return?preserveMessageQos=true"); --- my setup: I am using Camel 1.1 and the new Camel-1.1.20070926.001132-62 snapshot ( without activemq component?) and ApacheActiveMQ 4.1.1 with Java 1.5 (build 1.5.0_08-b03) and a Linux Box with 2.6.16.21 Kernel ---- Any comments very welcome Thanks in advance Andreas |
|
On 26/09/2007, schlemmi <[hidden email]> wrote:
> > Hi, > > First: Camel is very cool, I like that! Thanks! :) > I used it since 4 weeks with activemq and the lingo library. Great! BTW I've been slowly working on integrating most of the Lingo library functionality now; so you can use Camel to do custom transformations or smart routing, or just use JMS or any other transport just as easily as Lingo... http://activemq.apache.org/camel/bean-integration.html so eventually, when we've got all the features implemented, Camel could be a replacement for Lingo offering more features & being more flexible. > my question: Are message properties not forwarded with Camel ActiveMQ > Component? > > I want to consume a message filtered with message selectors send from a > CamelTemplate > to a comsumer queue. But the message properties wasn't send. So the message > selector doesn't match. > > If I use the direct and bean component I can route with headers. I'am not > sure, if this is a Camel problem > or a ActiveMQ task. > > the log for the send message: > --- > [DEBUG] 26 Sep 2007 13:58:47.229 [ActiveMQ Session Task] > [org.apache.camel.component.jms.JmsConfiguration$2] - Sending created > message [ActiveMQObjectMessage {commandId = 0, responseRequired = false, > messageId = null, originalDestination = null, originalTransactionId = null, > producerId = null, destination = null, transactionId = null, expiration = 0, > timestamp = 0, arrival = 0, correlationId = null, replyTo = null, persistent > = false, type = null, priority = 0, groupID = null, groupSequence = 0, > targetConsumerId = null, compressed = false, userID = null, content = > org.apache.activemq.util.ByteSequence@1ae717f, marshalledProperties = null, > dataStructure = null, redeliveryCounter = 0, size = 0, properties = > {orderer=helmo}, readOnlyProperties = false, readOnlyBody = false, droppable > = false}] > --- > > the message in the consumer queue: > --- > [INFO] 26 Sep 2007 13:58:47.646 [ActiveMQ Session Task] > [de.planetic.ConsumerTool] - ActiveMQObjectMessage {commandId = 5, > responseRequired = false, messageId = > ID:merope-42394-1190807879122-1:2:1:1:1, originalDestination = null, > originalTransactionId = null, producerId = > ID:merope-42394-1190807879122-1:2:1:1, destination = > queue://servicefacade.return, transactionId = null, expiration = 0, > timestamp = 1190807927230, arrival = 0, correlationId = null, replyTo = > null, persistent = false, type = null, priority = 0, groupID = null, > groupSequence = 0, targetConsumerId = null, compressed = false, userID = > null, content = org.apache.activemq.util.ByteSequence@56d149, > marshalledProperties = org.apache.activemq.util.ByteSequence@1c634b9, > dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, > readOnlyProperties = true, readOnlyBody = true, droppable = false} > > --- > Please look at the properties. There are not forwarded to the customer > queue. Are you positive thats not just a logging issue. (ActiveMQ only deserializes the properties lazily; so they don't necessarily always appear in a log statement AFAIK). > The route: > > from("direct:de.planetic.renderfacade"). > filter(body().isInstanceOf(RenderReturnMessage.class)). > to("activemq:servicefacade.return?preserveMessageQos=true"); > > --- > my setup: I am using Camel 1.1 and the new Camel-1.1.20070926.001132-62 > snapshot ( without activemq component?) and ApacheActiveMQ 4.1.1 with Java > 1.5 (build 1.5.0_08-b03) and a Linux Box with > 2.6.16.21 Kernel FWIW there have been some issues post 1.1 with preserving headers with JMS but AFAIK they are all fixed now? I wonder any chance you could create a little JUnit test case to show your issue? AFAIK headers should be preserved. -- James ------- http://macstrac.blogspot.com/ Open Source SOA http://open.iona.com |
|
James,
Thanks for the response, >> I used it since 4 weeks with activemq and the lingo library. > >Great! BTW I've been slowly working on integrating most of the Lingo >library functionality now; so you can use Camel to do custom >transformations or smart routing, or just use JMS or any other >transport just as easily as Lingo... > >http://activemq.apache.org/camel/bean-integration.html > >so eventually, when we've got all the features implemented, Camel >could be a replacement for Lingo offering more features & being more >flexible. I use some features from the bean component and I think I can kill the library on the server side... > >> the log for the send message: >> --- >Are you positive thats not just a logging issue. (ActiveMQ only >deserializes the properties lazily; so they don't necessarily always >appear in a log statement AFAIK). You are right, this is a logging issue. I can route with the header. Apparently I need advanced training in message selectors and headers... -- Andreas |
|
On 26/09/2007, schlemmi <[hidden email]> wrote:
> > James, > > Thanks for the response, > > >> I used it since 4 weeks with activemq and the lingo library. > > > >Great! BTW I've been slowly working on integrating most of the Lingo > >library functionality now; so you can use Camel to do custom > >transformations or smart routing, or just use JMS or any other > >transport just as easily as Lingo... > > > >http://activemq.apache.org/camel/bean-integration.html > > > >so eventually, when we've got all the features implemented, Camel > >could be a replacement for Lingo offering more features & being more > >flexible. > > I use some features from the bean component and I think I can kill the > library > on the server side... Cool! > >> the log for the send message: > >> --- > > >Are you positive thats not just a logging issue. (ActiveMQ only > >deserializes the properties lazily; so they don't necessarily always > >appear in a log statement AFAIK). > > You are right, this is a logging issue. Sorry about that! This one has bitten me once or twice. We should probably fix the logging messages in ActiveMQ to miss that out maybe or something. (The main complexity is the log message is generated using reflection). > I can route with the header. Great! > Apparently I need advanced training in message selectors and headers... :) -- James ------- http://macstrac.blogspot.com/ Open Source SOA http://open.iona.com |
| Powered by Nabble | Edit this page |
