Hi Dana,
as far as I know you can not directly use a temp queue as a destination.
Temp queues are special in jms as you ask jms to create a temp queue for
you and then get its name.
So in camel you can use temp queues only for replies. I have no idea why
there is a temp: syntax in the jms component as I think it can not work.
Another thing are dynamic queues. You just use them like a normal queue.
The only difference is that the jms server creates it if it is not
already present.
Christian
Am 19.07.2011 22:08, schrieb dshaw:
I'm still pretty new to camel and activemq.
//env
java 1.5
spring 3.0.5
camel 2.6.0
activemq 5.4.2
I'm trying to create a route from a regular activemq queue to a temp queue.
I'm not 100% sure where I'm going wrong.
If I set my camel route from -> to to use a regular queue everything works
fine.
I'm thinking I'm missing super simple. The request, reply works fine using
regular queues. Any help would be a much appreciated!!
Thanks Dana
//camel-context.xml snip
<route>
<from uri="jms:queue:testin"/>
<to uri="jms:temp:queue:foo"/>
</route>
<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL"
value="vm://localhost?broker.persistent=true&broker.useJmx=yes"/>
</bean>
</property>
</bean>
///test class
final BeanFactory factory = new XmlBeanFactory(new
FileSystemResource("src/test/resources/META-INF/spring/application.xml"));
org.springframework.jms.core.JmsTemplate template =
(org.springframework.jms.core.JmsTemplate) factory.getBean("jmsTemplate");
template.send("testin", new MessageCreator() {
public javax.jms.Message createMessage(javax.jms.Session
session)
throws JMSException {
javax.jms.Message message = (javax.jms.Message)
session.createMessage();
message.setStringProperty("myproperty", "hello
world!!!");
return message;
}
});
javax.jms.Message recievedMessage = (javax.jms.Message)
template.receive("foo");
logger.info("recieved 2");
logger.info("recievedMessage.getJMSMessageID()-->" +
recievedMessage.getJMSMessageID());
--
View this message in context:
http://camel.465427.n5.nabble.com/camel-route-with-temporary-queue-seems-to-just-hang-tp4613521p4613521.html
Sent from the Camel - Users mailing list archive at Nabble.com.
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com