How did you test this?
I set up a small example which shows that the deliveryPersistent option
works. However, it looks like the replyToDeliveryPersistent option has no
effect (with Camel 2.8.0 and also Camel 2.10.2). It's delivered persistent
independent from the configuration.
Maybe an ActiveMQ expert could have a look at it!?

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")
                    .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&replyToDeliveryPersistent=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(2),
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 Mon, Dec 10, 2012 at 2:43 AM, brking <brk...@gmail.com> wrote:

> I'm not sure what configuration you mean. These are just options I'm using
> on
> the uri I'm providing to requestBody on the producer template per the camel
> jms documentation.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/JMS-persistence-options-have-no-effect-tp5723805p5723808.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--

Reply via email to