Try using a JMS selector on the URI: https://camel.apache.org/jms.html
On Thu, Jun 6, 2019 at 1:03 AM Wang Yan <wyan...@gmail.com> wrote: > I used below example to select message. > although it can send matched message to toqueue > but not matched messages are also dequeued > What I want to achieve is only matched messages will be > selected and sent to toqueue . > > Any suggestion or hints how to do this with camel filter? > > from("activemq:queue:inputqueue?transacted=true") > .filter(header("foo").isEqualTo("bar")) > .to("activemq:queue:toqueue"); >