You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by VikasG <me...@gmail.com> on 2010/07/01 10:07:50 UTC
JMS Selector - Inconsitent
Hi,
I wrote the following route to remove/consume a particular message from the
queue when header i.e. "sender" is equal to the provided
value.
from("activemq:queue:" + from +"?selector=sender='" + sender +
"'").to("activemq:queue:Q4");
Now, the issues are:
1. Inconsistency while removing messages from queue like sometimes removes
all or sometimes 2-3 out of 4 valid messages in queue.
2. Not forwarding messages to other specified queue i.e. Q4.
Am i missing something? Please guide.
-Vikas
--
View this message in context: http://camel.465427.n5.nabble.com/JMS-Selector-Inconsitent-tp512311p512311.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: JMS Selector - Inconsitent
Posted by VikasG <me...@gmail.com>.
Thanks for the reply.
My code to start the route is as follows:
CamelContext cc = new DefaultCamelContext();
cc.addComponent("activemq",
ActiveMQComponent.activeMQComponent("tcp://localhost:61616"));
cc.start();
cc.addRoutes(new RouteBuilder() {
public void configure() throws Exception {
from("activemq:queue:" + queueName + "?selector=sender='" +
mobileNumber + "'").to("activemq:queue:Q4");
}
});
cc.stop();
If we use transaction option then performance issue might be occurred.
Is't?
-Vikas
--
View this message in context: http://camel.465427.n5.nabble.com/JMS-Selector-Inconsitent-tp512311p512610.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: JMS Selector - Inconsitent
Posted by "Willem.Jiang" <wi...@gmail.com>.
How did your start the route?
Did you set up the transaction option on your activemq component ?
Willem
----------------------------------
Apache Camel, Apache CXF committer
Open SOA http://www.fusesource.com
Blog http://willemjiang.blogspot.com
Tiwtter http://twitter.com/willemjiang
VikasG wrote:
>
> Hi,
>
>
> I wrote the following route to remove/consume a particular message from
> the queue when header i.e. "sender" is equal to the provided
> value.
>
> from("activemq:queue:" + from +"?selector=sender='" + sender +
> "'").to("activemq:queue:Q4");
>
>
> Now, the issues are:
>
> 1. Inconsistency while removing messages from queue like sometimes
> removes all or sometimes 2-3 out of 4 valid messages in queue.
>
> 2. Not forwarding messages to other specified queue i.e. Q4.
>
> Am i missing something? Please guide.
>
> -Vikas
>
>
--
View this message in context: http://camel.465427.n5.nabble.com/JMS-Selector-Inconsitent-tp512311p512594.html
Sent from the Camel - Users mailing list archive at Nabble.com.