What do you mean with "DOESNT WORK"?
You can check out our unit tests at [1] to see how it works.Search for
"RequestReply"...
I also set up a simple unit test with Camel 2.8.0 and ActiveMQ 5.5.1 and it
works:
public class CamelActiveMQInOutPerformanceTest extends CamelTestSupport {
private int counter = 100;
private BrokerService broker;
@Before
public void setUp() throws Exception {
broker = new BrokerService();
broker.setPersistent(true);
broker.setUseJmx(false);
broker.addConnector("tcp://localhost:61616");
broker.start();
super.setUp();
}
@After
public void tearDown() throws Exception {
super.tearDown();
broker.stop();
}
@Test
public void test() throws Exception {
getMockEndpoint("mock:end").setExpectedMessageCount(counter);
context.addRoutes(new RouteBuilder() {
public void configure() throws Exception {
from("activemq:queue:test")
.setBody(constant("Camel"))
.to("mock:end");
}
});
for (int i = 0; i < counter; i++) {
Object response = template.requestBody("activemq:queue:test",
"What's the best integration framework?");
assertEquals("Camel", response);
}
assertMockEndpointsSatisfied();
}
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry registry = super.createRegistry();
registry.bind("activemq",
ActiveMQComponent.activeMQComponent("tcp://localhost:61616"));
return registry;
}
}
[1]
https://svn.apache.org/repos/asf/camel/tags/camel-2.8.0/components/camel-jms/src/test/java/org/apache/camel/component/jms/
Best,
Christian
On Fri, Dec 7, 2012 at 5:13 PM, brking <[email protected]> wrote:
> I've been trying to get request reply working in 2.8 over JMS. I am
> confused
> as to the following behavior:
>
> - If I dont set a replyTo queue, requestBody() times out and I never get a
> response
>
> - If I set a replyTo queue, I get messages once per second. (I thought this
> was fixed in 2.8 ?), I can improve that by setting receiveTimeout=xxx.
>
> - If I set a replyTo queue and mark it as exclusive I get decent
> performance, but was hoping for better on temporary queues.
>
> I'd like to get temporary queues working. Is there any other requirement
> other than setting exchangePattern=InOut on the Uri ? My code is very
> simple:
>
> // DOESNT WORK String uri = String.format("%s?exchangePattern=InOut",
> requestQueue);
>
> String uri =
> String.format("%s?exchangePattern=InOut&replyTo=%s&replyToType=Exclusive",
> requestQueue, replyQueue);
>
> String result = (String)template.requestBody(uri, data);
>
> I'm using ActievMQ 5.5.1 on Windows 7 64 bit.
>
> Thank you
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/JMS-Request-Reply-not-working-with-temporary-queues-in-2-8-tp5723771.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--