I got it.
Thanks ,Ashwin!

Ashwin Karpe wrote:
> 
> Hi,
> 
> This is not a bug. The way your DSL has been written seems to desire this
> effect of dropping messages on both queues.
> 
> If yo need to move from "jms:in" to "jms:out2" without leaving any
> messages on "jms:out1" then you need to write your DSL as
> 
>      from("jms:in").to("jms:out1");
>      from(jms:out1).to(jms:out2");
> 
> Cheers,
> 
> Ashwin...
> 
> honno wrote:
>> 
>> hi,i write a DSL route,like this : 
>> from("jms:in").to("jms:out1").to("jms:out2");
>> Then,i send two messages to the queue "in" with activemq5.2,and i receive
>> two messages at queue "out1",and two messages at queue "out2".
>> These messages are:
>> in "out1":
>> ActiveMQTextMessage {commandId = 7, responseRequired = true, messageId =
>> ID:lenovo-c5e61c7a-2160-1257940811343-0:0:1:1:1, originalDestination =
>> null, originalTransactionId = null, producerId =
>> ID:lenovo-c5e61c7a-2160-1257940811343-0:0:1:1, destination =
>> queue://out1, transactionId = null, expiration = 0, timestamp =
>> 1257940818046, arrival = 0, brokerInTime = 1257940818046, brokerOutTime =
>> 1257940883000, correlationId = null, replyTo = null, persistent = true,
>> type = null, priority = 4, groupID = null, groupSequence = 0,
>> targetConsumerId = null, compressed = false, userID = null, content =
>> null, marshalledProperties =
>> org.apache.activemq.util.byteseque...@10045eb, dataStructure = null,
>> redeliveryCounter = 0, size = 0, properties = {foo=bar,
>> CamelJmsDeliveryMode=1}, readOnlyProperties = true, readOnlyBody = true,
>> droppable = false, text = <one/>}
>> 
>> ActiveMQTextMessage {commandId = 14, responseRequired = true, messageId =
>> ID:lenovo-c5e61c7a-2160-1257940811343-0:0:1:3:1, originalDestination =
>> null, originalTransactionId = null, producerId =
>> ID:lenovo-c5e61c7a-2160-1257940811343-0:0:1:3, destination =
>> queue://out1, transactionId = null, expiration = 0, timestamp =
>> 1257940818046, arrival = 0, brokerInTime = 1257940818046, brokerOutTime =
>> 1257940883000, correlationId = null, replyTo = null, persistent = true,
>> type = null, priority = 4, groupID = null, groupSequence = 0,
>> targetConsumerId = null, compressed = false, userID = null, content =
>> null, marshalledProperties =
>> org.apache.activemq.util.byteseque...@90cb03, dataStructure = null,
>> redeliveryCounter = 0, size = 0, properties = {foo=a,
>> CamelJmsDeliveryMode=1}, readOnlyProperties = true, readOnlyBody = true,
>> droppable = false, text = <name>honnom</name>}
>> 
>> in "out2":
>> ActiveMQTextMessage {commandId = 10, responseRequired = true, messageId =
>> ID:lenovo-c5e61c7a-2160-1257940811343-0:0:1:2:1, originalDestination =
>> null, originalTransactionId = null, producerId =
>> ID:lenovo-c5e61c7a-2160-1257940811343-0:0:1:2, destination =
>> queue://out2, transactionId = null, expiration = 0, timestamp =
>> 1257940818046, arrival = 0, brokerInTime = 1257940818046, brokerOutTime =
>> 1257940831750, correlationId = null, replyTo = null, persistent = true,
>> type = null, priority = 4, groupID = null, groupSequence = 0,
>> targetConsumerId = null, compressed = false, userID = null, content =
>> null, marshalledProperties =
>> org.apache.activemq.util.byteseque...@10045eb, dataStructure = null,
>> redeliveryCounter = 0, size = 0, properties = {foo=bar,
>> CamelJmsDeliveryMode=1}, readOnlyProperties = true, readOnlyBody = true,
>> droppable = false, text = <one/>}
>> 
>> ActiveMQTextMessage {commandId = 17, responseRequired = true, messageId =
>> ID:lenovo-c5e61c7a-2160-1257940811343-0:0:1:4:1, originalDestination =
>> null, originalTransactionId = null, producerId =
>> ID:lenovo-c5e61c7a-2160-1257940811343-0:0:1:4, destination =
>> queue://out2, transactionId = null, expiration = 0, timestamp =
>> 1257940818062, arrival = 0, brokerInTime = 1257940818062, brokerOutTime =
>> 1257940831750, correlationId = null, replyTo = null, persistent = true,
>> type = null, priority = 4, groupID = null, groupSequence = 0,
>> targetConsumerId = null, compressed = false, userID = null, content =
>> null, marshalledProperties =
>> org.apache.activemq.util.byteseque...@90cb03, dataStructure = null,
>> redeliveryCounter = 0, size = 0, properties = {foo=a,
>> CamelJmsDeliveryMode=1}, readOnlyProperties = true, readOnlyBody = true,
>> droppable = false, text = <name>honnom</name>}
>> 
>> So the both  queue "out1"  and "out2"  receive  the two messages.
>> my question is  that why i can receive  two messages in  queue "out1" 
>> ,but i just want to send two messages to queue "in" and only receive  two 
>> messages in queue "out2" ,not both in queue"out1"  and queue "out2".
>> Is this a bug of camel-jms?  Camel  copys  all messages from  "out1"  to
>> "out2",but dose not remove 
>> all  messages in "out1".
>> if i want to remove all messages from  "out1"  to "out2" ,not copying all
>> messages from  "out1"  to "out2",
>> how can  i config  the route?
>> Thanks!
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Is-this-a-bug-of-camel-jms--tp26300321p26312811.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to