It might be me, but does that code compile ?

You are calling

from(MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME).process(_*new
MemosProcess(getContext().createProducerTemplate())*_)
.end();

But the class you are showing doesn't have a constructor that takes a 
producerTemplate ?

Just to be sure, the message wouldn't be routed with your code. Instead You 
would be creating a new message
with the body "Consumer Test" and whatever headers you are setting.

If that is what you want, I am inclined to think that you should add a to step 
to your route:

from(MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME)
 .process(new MemosProcess(getContext().createProducerTemplate()))
 .to("activemq:topic:dev.null");

Note, that sending the message to the other Queue is some kind of "side effect" 
with your code.

One thing to check is the clock on your machines...if they are not in sync you 
sometimes see odd things happening.
As you are not setting TTL's i don't think that'd affect you.


A final word, you might want to look at the excellent Camel Test support 
(http://camel.apache.org/camel-test.html).
This will let you run Camel routes within JUnit test, create mock endpoints and 
create / validate assertions for them.


Hope that helps
Andreas



On 09/06/2013 10:06 AM, prabumc...@gmail.com wrote:
Thanks so much fro reply .

I am not setting TTL for any messages

If i run test case in single machine ( test case and broker) it worked fine.

Issue is when i run test case connecting broker which is running
in separate machine.

I have 2 different queue

public static final String MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME  =
"activemq:queue:Inbound.Memos.Consumer.Test";

public static final String CONSUMER_TEST_QNAME                          =
"activemq:queue:ConsumerTestHandler?jmsMessageType=Text&preserveMessageQos=true";


from(MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME).process(new
MemosProcess(getContext().createProducerTemplate()))
.end();


class MemosProcess implements Processor,QnamesInterface {
   @Override
       public void process(Exchange exchange) throws Exception {

           JmsMessage msg = (JmsMessage) exchange.getIn();
           -------------
           -------------
           prodtemplate.sendBodyAndHeaders(CONSUMER_TEST_QNAME,"Consumer
test",headers);
       }
   }


Messages stayed in Inbound.Memos.Consumer.Test not routed into
ConsumerTestHandler.

it worked fine in active-mq 5.5

Please kindly help

Issue only in active 5.8 and camel 2.10.3

*Regards*
Prabu.N


On Fri, Sep 6, 2013 at 1:16 PM, Andreas Gies [via Camel] <
ml-node+s465427n5738828...@n5.nabble.com> wrote:

Hmmm,

to me the log output seems to document what you are after.
Maybe you want to rephrase the question and / or provide your route
and a test case ? - A description of what you are trying to achieve might
also help.

I haven't seen answers to the questions that have been asked:

Are you using transacted routes ? - What is the TTL of your messages ?
Is the entire use case run on a single machine ? - Have you examined
the inflight messages as suggested ?



Best regards
Andreas


On 09/05/2013 08:46 PM, [hidden 
email]<http://user/SendEmail.jtp?type=node&node=5738828&i=0>wrote:

I am using camel 2.10.3 version
On Sep 5, 2013 10:22 PM, "Prabu" <[hidden 
email]<http://user/SendEmail.jtp?type=node&node=5738828&i=1>>
wrote:
Pls help me...

*Thanks*
Prabu.N


On Thu, Sep 5, 2013 at 6:41 PM, Prabu <[hidden 
email]<http://user/SendEmail.jtp?type=node&node=5738828&i=2>>
wrote:
Hi Ceposta,

After enable debug i can see following log details.

2013-09-05 08:02:41,023 | DEBUG |
Endpoint[activemq://queue:BOA.InboundQueue] consumer received JMS
message:
ActiveMQTextMessage {commandId = 24, responseRequired = true,
messageId =
ID:Corp-TSOpus02-50552-1378385398624-4:1:1:1:20, originalDestination =
null, originalTransactionId = null, producerId =
ID:Corp-TSOpus02-50552-1378385398624-4:1:1:1, destination =
queue://BOA.InboundQueue, transactionId = null, expiration = 0,
timestamp =
1378386161018, arrival = 0, brokerInTime = 1378386161020,
brokerOutTime =
1378386161022, 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.ByteSequence@58b94e98,
dataStructure = null, redeliveryCounter = 0, size = 1539, properties =
{MESSAGE_ID=cde10e13-5e66-4dac-88bd-acc05aa091e8,
PAST_EVENT_INTERVAL=0,
MEMOS_TARGET_SERVERS=PITB-MW-MSG0A01:PITB-MW-MSG0A02,
soft_EVENT_CLASS_NAME=com.soft.event.TestEvent, soft_EVENT_VERSION=1,
RESTFUL_SERVICE_URL=http://Corp-TSOpus02:5050/memos/,
EXPIRY_TIME=300000, TestEventType=LogMessage,
soft_EVENT_TYPE=Memos.Consumer.Test}, readOnlyProperties = true,
readOnlyBody = true, droppable = false, text = {"creationDate":"Sep
05,
2013 8:02:41 AM","na...nterval":0}
} | org.apache.camel.component.jms.EndpointMessageListener | Camel
(camelContext1) thread #0 - JmsConsumer[BOA.InboundQueue]
2013-09-05 08:02:41,024 | DEBUG | #0 - header{header(soft_EVENT_TYPE)}
is
not null matches: true for: Exchange[JmsMessage[JmsMessageID:
ID:Corp-TSOpus02-50552-1378385398624-4:1:1:1:20]] |
org.apache.camel.processor.ChoiceProcessor | Camel (camelContext1)
thread
#0 - JmsConsumer[BOA.InboundQueue]

2013-09-05 08:02:41,025 | DEBUG | Redelivery enabled: false on error
handler:

DefaultErrorHandler[Producer[activemq://queue:Inbound.Memos.Consumer.Test]]
| org.apache.camel.processor.DefaultErrorHandler | Camel
(camelContext1)
thread #0 - JmsConsumer[BOA.InboundQueue]
2013-09-05 08:02:41,025 | DEBUG | Executing callback on JMS Session:
Cached JMS Session: ActiveMQSession

{id=ID:pitb-mw-msg0a02.test.aus.soft.net-3432-1378385347963-3:1:30,started=true}

| org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate |
Camel
(camelContext1) thread #0 - JmsConsumer[BOA.InboundQueue]

2013-09-05 08:02:41,026 | DEBUG | Sending JMS message to:
queue://Inbound.Memos.Consumer.Test with message: ActiveMQTextMessage
{commandId = 0, responseRequired = false, messageId = null,
originalDestination = null, originalTransactionId = null, producerId =
null, destination = null, transactionId = null, expiration = 0,
timestamp =
0, arrival = 0, brokerInTime = 0, brokerOutTime = 0, correlationId =
null,
replyTo = null, persistent = true, type = null, priority = 4, groupID
=
null, groupSequence = 0, targetConsumerId = null, compressed = false,
userID = null, content = null, marshalledProperties = null,
dataStructure =
null, redeliveryCounter = 0, size = 0, properties =
{MESSAGE_ID=cde10e13-5e66-4dac-88bd-acc05aa091e8,
PAST_EVENT_INTERVAL=0,
MEMOS_TARGET_SERVERS=PITB-MW-MSG0A01:PITB-MW-MSG0A02,
soft_EVENT_CLASS_NAME=com.soft.event.TestEvent, soft_EVENT_VERSION=1,
breadcrumbId=ID:Corp-TSOpus02-50552-1378385398624-4:1:1:1:20,
RESTFUL_SERVICE_URL=http://Corp-TSOpus02:5050/memos/,
EXPIRY_TIME=300000, CamelJmsDeliveryMode=2, TestEventType=LogMessage,
soft_EVENT_TYPE=Memos.Consumer.Test}, readOnlyProperties = false,
readOnlyBody = false, droppable = false, text = {"creationDate":"Sep
05,
2013 8:02:41 AM","na...nterval":0}


*Thanks*
Prabu.N



On Thu, Sep 5, 2013 at 11:36 AM, Prabu <[hidden 
email]<http://user/SendEmail.jtp?type=node&node=5738828&i=3>>
wrote:
*Queue name*

public static final String CONSUMER_TEST_QNAME   =

"activemq:queue:ConsumerTestHandlerjmsMessageType=Text&preserveMessageQos=true";

public static final String PRODUCER_TEST_QNAME    =

"activemq:queue:ProducerTestHandler?jmsMessageType=Text&preserveMessageQos=true";

public static final String
MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME
   = "activemq:queue:Inbound.Memos.Consumer.Test";

public static final String
MESSAGING_TEST_PRODUCER_TYPE_SPECIFIC_QNAME
   = "activemq:queue:Inbound.Memos.Producer.Test";

Sorry,I am new to camel.So i am sure what your asking.

*Thanks*
Prabu.N



On Thu, Sep 5, 2013 at 9:49 AM, ceposta [via Camel] <
[hidden email] <http://user/SendEmail.jtp?type=node&node=5738828&i=4>>
wrote:
Maybe a good idea to go through my previous questions closely and
provide
answers so we can better help you:

"What does it do?

Does the broker dispatch messages to the client (you can see with
the
"in-flight" metrics on the broker)?

Can you turn up the logging and see what camel is doing? what sort
of
ack
mode are you using on the connection?"


On Wed, Sep 4, 2013 at 9:09 PM, [hidden email]<
http://user/SendEmail.jtp?type=node&node=5738713&i=0>
<[hidden email] <
http://user/SendEmail.jtp?type=node&node=5738713&i=1>>wrote:

Yes I can some messages in dlq.type.specfic.queue and some messgaes
on type
specific queue.

Messges not route to outbound queue.

Pls suggest what is the fix for this.

It almost 2 days I am having this issue pls suggest
On Sep 5, 2013 8:17 AM, "ceposta [via Camel]" <
[hidden email] <
http://user/SendEmail.jtp?type=node&node=5738713&i=2>>
wrote:
Maybe your TTL is set too short and the broker is rejecting those
messages.
Can you check your DLQ to see whether the messages are in there?


On Wed, Sep 4, 2013 at 7:07 PM, [hidden email]<
http://user/SendEmail.jtp?type=node&node=5738709&i=0>
<[hidden email] <
http://user/SendEmail.jtp?type=node&node=5738709&i=1

wrote:
I am using simple failover url

Failover:(ssl://br1,ssl://br2)

my aim is set expiry time to message thats why I am
producertemplate it
creating issue here.

Message will send

Type specific queue After that camel use producertemplate set
expiry
time
to msg it send msg to another outbound queue.

Now what is happening message staying on type specific queue and
it
routing
message each 3 to 5 min time.taking long time to route msg.

Pls kindly help me.
On Sep 5, 2013 1:42 AM, "ceposta [via Camel]" <
[hidden email] <
http://user/SendEmail.jtp?type=node&node=5738709&i=2>>
wrote:
What does it do? Does the broker dispatch messages to the
client (you
can
see with the "in-flight" metrics on the broker)? Can you turn
up the
logging and see what camel is doing? what sort of ack mode are
you
using
on
the connection?


On Wed, Sep 4, 2013 at 11:50 AM, [hidden email]<
http://user/SendEmail.jtp?type=node&node=5738702&i=0>
<[hidden email] <
http://user/SendEmail.jtp?type=node&node=5738702&i=1
wrote:
My code worked fine in activemq 5.5 only issue after
upgrading
activemq
5.8
Camel i having code like

from(MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME).process(new
MemosProcess(getContext().createProducerTemplate()))
.end();



class MemosProcess implements Processor,QnamesInterface {
    private static final Logger LOG =
LoggerFactory.getLogger(MemosProcess.class);

        ProducerTemplate prodtemplate=null;
        public MemosProcess(){

        }
        public MemosProcess(ProducerTemplate template) {
          this.prodtemplate=template;
        }

        @Override
        public void process(Exchange exchange) throws Exception
{
            JmsMessage msg = (JmsMessage) exchange.getIn();
            Map<String, Object> headers = msg.getHeaders();

            String eventType            = (String)
headers.get(EVENT_TYPE);
            String msgId                = (String)
headers.get(MESSAGE_ID);
            System.out.println("Memos-msgid:"+msgId);
            int msg_Expiry_Time         =
Integer.parseInt((String)
headers.get(EXPIRY_TIME));
            InetAddress address         =
InetAddress.getLocalHost();
            String hostname             =
address.getHostName();
            long MSG_EXPIRY  = System.currentTimeMillis() +
msg_Expiry_Time;
            headers.put(JMSExpiration,MSG_EXPIRY);

            String restfulServiceURL =(String)
headers.get(MEMOS_RESTFULSERVICE_URL);
            restfulServiceURL=restfulServiceURL+"update";

            if
(eventType.equalsIgnoreCase(CONSUMER_EVENT_TYPE)) {
              String serversList    = (String)
headers.get(MEMOS_TARGET_SERVERS);

              String servers []     = serversList.split(":");
              String handler1       = "";
              String handler2       = "";

              if (servers.length >=2) {
                handler1       = servers[0];
                handler2       = servers[1];
              }
              headers.put(MEMOS_TARGET_SERVER,handler1);

prodtemplate.sendBodyAndHeaders(CONSUMER_TEST_QNAME,"Consumer
test",headers);
              headers.put(MEMOS_TARGET_SERVER,handler2);
              new MemosProcess().callService(msgId,
hostname,restfulServiceURL);

prodtemplate.sendBodyAndHeaders(CONSUMER_TEST_QNAME,"Consumer
test",headers);
            }else
if(eventType.equalsIgnoreCase(PRODUCER_EVENT_TYPE)){
              new MemosProcess().callService(msgId,
hostname,restfulServiceURL);

prodtemplate.sendBodyAndHeaders(PRODUCER_TEST_QNAME,"Producer
test",headers);
            }
         }


above code worked fine in active 5.5 but after upgrade into
active
5.8
it
is
not working

Message getting hang in
MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME
not
calling memosprocess class.

Please kindly help me.



--
View this message in context:

http://camel.465427.n5.nabble.com/Camel-routing-issue-after-upgrade-into-active-mq-5-8-tp5738700.html
Sent from the Camel - Users mailing list archive at
Nabble.com.

--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta
   http://www.christianposta.com/blog


------------------------------
   If you reply to this email, your message will be added to the
discussion
below:


http://camel.465427.n5.nabble.com/Camel-routing-issue-after-upgrade-into-active-mq-5-8-tp5738700p5738702.html
   To unsubscribe from Camel routing issue after upgrade into
active-mq
5.8, click
here<

.
NAML<
http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml


--
View this message in context:

http://camel.465427.n5.nabble.com/Camel-routing-issue-after-upgrade-into-active-mq-5-8-tp5738700p5738708.html
Sent from the Camel - Users mailing list archive at Nabble.com.


--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta
   http://www.christianposta.com/blog


------------------------------
   If you reply to this email, your message will be added to the
discussion
below:


http://camel.465427.n5.nabble.com/Camel-routing-issue-after-upgrade-into-active-mq-5-8-tp5738700p5738709.html
   To unsubscribe from Camel routing issue after upgrade into
active-mq
5.8, click
here<

.
NAML<
http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml


--
View this message in context:

http://camel.465427.n5.nabble.com/Camel-routing-issue-after-upgrade-into-active-mq-5-8-tp5738700p5738712.html
Sent from the Camel - Users mailing list archive at Nabble.com.


--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta
   http://www.christianposta.com/blog


------------------------------
   If you reply to this email, your message will be added to the
discussion below:


http://camel.465427.n5.nabble.com/Camel-routing-issue-after-upgrade-into-active-mq-5-8-tp5738700p5738713.html
   To unsubscribe from Camel routing issue after upgrade into
active-mq
5.8, click here<
.
NAML<
http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


--
Thanks & Regards
   Prabu.N


--
Thanks & Regards
   Prabu.N


--
Thanks & Regards
   Prabu.N



--
View this message in context:
http://camel.465427.n5.nabble.com/Camel-routing-issue-after-upgrade-into-active-mq-5-8-tp5738700p5738804.html

Sent from the Camel - Users mailing list archive at Nabble.com.


------------------------------
  If you reply to this email, your message will be added to the discussion
below:

http://camel.465427.n5.nabble.com/Camel-routing-issue-after-upgrade-into-active-mq-5-8-tp5738700p5738828.html
  To unsubscribe from Camel routing issue after upgrade into active-mq 5.8, 
click
here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5738700&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczODcwMHw4OTY0MTU3ODg=>
.
NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




Reply via email to