You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by sandeep reddy <sa...@in2m.com> on 2008/06/26 07:03:32 UTC

message properties stripped out

I have servicemix-camel 3.2.2 snapshot in my ServiceMix 3.2.1 instance.

   Flow :

      Http-SU(provider) --> Bean-SU(setting properties in message header)
--> camel-SU --> JMS-Provider-SU --> JMSConsumer-SU

       I am setting some properties during Bean-SU and that message goes to
JMSProvider-SU.
       Then that message is kept into Queue(MessageQueue). But observed that
properties kept during Bean-SU were
       stripped out.(observed using JCONSOLE).

       So, for this i came to know to use marshalers.But, i don't know much
about it.
       Can anybody help me out? how i can solve it.

Sandeep.
-- 
View this message in context: http://www.nabble.com/message-properties-stripped-out-tp18126637p18126637.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: message properties stripped out

Posted by sandeep reddy <sa...@in2m.com>.
Hi Gert,

    Thanks for your reply.
    Done with creating a custom marshaler, creates message with setting up
properties.
    But currently facing another different problem which is related to
durableSubscriber.

    I am using Pub-Sub model using (topic).

    Problem:
             1. I am able to successfully send messages to topic.
             2. And consumers are able to get consume message depending upon
the criteria (using messageSelector). But here some times when my consumer
goes offline at that time if any message comes to topic are not able to
consume that message.
             3. So found that to use durableSubscriber.But after doing
necessary settings, deployed component to servicemix getting error :
               
                       ERROR - DefaultMessageListenerContainer - Setup of
JMS message listener invoker failed - trying to recover
        javax.jms.JMSException: You cannot create a durable subscriber
without specifying a unique clientID on a Connection
        at
org.apache.activemq.ActiveMQConnection.checkClientIDWasManuallySpecified(ActiveMQConnection.java:1138)
        at
org.apache.activemq.ActiveMQSession.createDurableSubscriber(ActiveMQSession.java:1066)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.createConsumer(AbstractPollingMessageListenerContainer.java:429)

Note: Using servicemix3.2.1

JMSConsumer configuration:

             <jms:consumer service="up:DirectorConsumerService"
                  endpoint="directorConsumerEndpoint"
                  targetService="up:DirectorConsumerService"
                  pubSubDomain="true"
                  clientId="Director"
                  durableSubscriptionName="Director"
                  subscriptionDurable="true"
                  destinationName="updateUserProfileTopic"
                  connectionFactory="#connectionFactory"
                  messageSelector="userPrincipals LIKE '%sandeep2%'"/>
   
    <jms:consumer service="up:PortalConsumerService"
                            endpoint="portalConsumerEndpoint"
                            targetService="up:PortalConsumerService"
                            pubSubDomain="true"
                            clientId="Portal"
                           durableSubscriptionName="Portal"
                           subscriptionDurable="true"
                           destinationName="updateUserProfileTopic"
                           connectionFactory="#connectionFactory"
                          messageSelector="userPrincipals LIKE '%smx%'"/>

     
what's wrong?

Sandeep.

-- 
View this message in context: http://www.nabble.com/message-properties-stripped-out-tp18126637p18210468.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: message properties stripped out

Posted by Gert Vanthienen <ge...@skynet.be>.
Sandeep,

If you are setting the property values to the NormalizedMessage header 
value, they should be transfered together with the message inside 
Camel.  However,  properties set at the MessageExchange level aren't 
forwared.  Are you sure you are setting the properties at the 
NormalizedMessage level (like 
exchange.getMessage("in").setProperty("myprop", "myvalue") in your bean 
SU) -- if not, the message properties are already lost before you put 
the message in the queue?

Also, are you using the new JMS endpoints (<jms:consumer/> and 
<jms:provider/>) or the older one (<jms:endpoint/>)?  The 
DefaultProviderMarshaler currently doesn't support forwarding JBI 
properties as MS properties.  You would have to build you own class that 
extends org.apache.servicemix.jms.endpoints.DefaultProviderMarshaler but 
also copies JBI message properties to the JMS TextMessage in the 
createMessage method.  Afterwards, configure this class in Spring and 
assign an instance of it to the "marshaler" property.

Regards,

Gert

sandeep reddy wrote:
> I have servicemix-camel 3.2.2 snapshot in my ServiceMix 3.2.1 instance.
>
>    Flow :
>
>       Http-SU(provider) --> Bean-SU(setting properties in message header)
> --> camel-SU --> JMS-Provider-SU --> JMSConsumer-SU
>
>        I am setting some properties during Bean-SU and that message goes to
> JMSProvider-SU.
>        Then that message is kept into Queue(MessageQueue). But observed that
> properties kept during Bean-SU were
>        stripped out.(observed using JCONSOLE).
>
>        So, for this i came to know to use marshalers.But, i don't know much
> about it.
>        Can anybody help me out? how i can solve it.
>
> Sandeep.
>