Haven't followed the thread very close, but be sure to enable
explicitQos for these flags to kick in
http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/jms/core/JmsTemplate.html#isExplicitQosEnabled()
http://camel.apache.org/jms.html


2012/12/17 Christian Müller <[email protected]>:
> I tried this too, but it doesn't work neither:
>
> public class CamelActiveMQConsumerPersistentIssueTest extends
> CamelTestSupport {
>
>     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 {
>         // 1 = NON_PERSISTENT
>         // 2 = PERSISTENT
>
>         context.addRoutes(new RouteBuilder() {
>             public void configure() throws Exception {
>                 from("activemq:queue:test?replyToDeliveryPersistent=false")
>                     .process(new Processor() {
>                         public void process(Exchange exchange) throws
> Exception {
>                             assertEquals(Integer.valueOf(1),
> exchange.getIn().getHeader("JMSDeliveryMode", Integer.class));
>                             exchange.getOut().setBody("Camel");
>                         }
>                     });
>             }
>         });
>
>         Exchange ex =
> template.request("activemq:queue:test?deliveryPersistent=false", new
> Processor() {
>             public void process(Exchange exchange) throws Exception {
>                 exchange.getIn().setBody("What's the best integration
> framework?");
>             }
>         });
>
>         assertEquals("Camel", ex.getOut().getBody(String.class));
>         assertEquals(Integer.valueOf(1),
> ex.getOut().getHeader("JMSDeliveryMode", Integer.class));
>     }
>
>     @Override
>     protected JndiRegistry createRegistry() throws Exception {
>         JndiRegistry registry = super.createRegistry();
>         registry.bind("activemq",
> ActiveMQComponent.activeMQComponent("failover:(tcp://localhost:61616)"));
>         return registry;
>     }
> }
>
> Best,
> Christian
>
> On Sat, Dec 15, 2012 at 10:50 AM, Claus Ibsen <[email protected]> wrote:
>
>> Hi
>>
>> replyToDeliveryPersistent is on the consumer side as I understand it.
>>
>>
>>
>>
>> On Fri, Dec 14, 2012 at 10:27 PM, Christian Müller
>> <[email protected]> wrote:
>> > replyToDeliveryPersistent
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: [email protected]
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>
>
>
> --



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Reply via email to