camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Malathi G <malathi...@gmail.com>
Subject ReplyTo Queue is not getting cleared
Date Thu, 05 Dec 2013 10:38:27 GMT
Hi,

I am transferring message from one queue to another queue and getting
response from ReplyTo queue but after reading message from ReplyTo queue, 
messages are not getting cleared in ReplyTo queue of weblogic. I am using
Weblogic queue. Please help me to correct this issue.

*camel code:*
        CamelContext context = new DefaultCamelContext();    
        String wlurl = "t3://localhost:7001/console";
        String jndiFactory = "weblogic.jndi.WLInitialContextFactory";
        
        Properties properties = new Properties();
        properties.put(Context.INITIAL_CONTEXT_FACTORY,jndiFactory);
        properties.put(Context.PROVIDER_URL, wlurl);
        Context jndiContext = new InitialContext(properties);
        
        QueueConnectionFactory  queueConnectionFactory=
(QueueConnectionFactory)jndiContext.lookup("JMSCF");
        context.addComponent( "jms",
JmsComponent.jmsComponentClientAcknowledge( queueConnectionFactory ) );
        
        context.addRoutes(new RouteBuilder() {
            public void configure() {
            
from("jms:queue:./JMSResources!Sender_Queue?username=admin&password=polaris123&jmsMessageType=Text")
            
.inOut("jms:queue:./JMSResources!Receiver_Queue?username=admin&password=polaris123&jmsMessageType=Text&replyTo=./JMSResources!ReplyTo_Queue&requestTimeout=100000");
                }
        });
        context.start();
        while(true)
        {
        	
        }

*JMS Stud code:*
        CamelContext context = new DefaultCamelContext();
        String wlurl = "t3://localhost:7001/console";
        String jndiFactory = "weblogic.jndi.WLInitialContextFactory";
        Properties properties = new Properties();
        properties.put(Context.INITIAL_CONTEXT_FACTORY,jndiFactory);
        properties.put(Context.PROVIDER_URL, wlurl);
        Context jndiContext = new InitialContext(properties);
        QueueConnectionFactory  queueConnectionFactory=
(QueueConnectionFactory)jndiContext.lookup("JMSCF");
        context.addComponent( "jms",
JmsComponent.jmsComponentClientAcknowledge( queueConnectionFactory ) );
        
        context.addRoutes(new RouteBuilder() {
            public void configure() {
               
from("jms:queue:./JMSResources!Receiver_Queue?username=admin&password=polaris123&jmsMessageType=Text")
                .process( new Processor() {
                      @Override
                      public void process( Exchange e )throws Exception{
                             e.getOut().setBody("Response from LMS"); 
                      }
                 } )
              
.inOnly("jms:queue:./JMSResources!ReplyTo_Queue?username=admin&password=polaris123&jmsMessageType=Text");
            }
        });
        context.start();
        while(true)
        {
        	
        }





--
View this message in context: http://camel.465427.n5.nabble.com/ReplyTo-Queue-is-not-getting-cleared-tp5744358.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message