-
1. Re: Fail to consume messages from remote machine
gseben Sep 30, 2009 2:19 PM (in response to concombremasqué)Hi,
Can you post your activemq.xml config file?
Thanks,
-Gio
-
2. Re: Fail to consume messages from remote machine
concombremasqué Sep 30, 2009 2:25 PM (in response to gseben)Thanks for looking at this.
Find attached my ActiveMQ configuration. This is the config I put into the 'deploy' folder of my ESB.
-
activemq-broker.xml 6.3 KB
-
-
3. Re: Fail to consume messages from remote machine
gseben Sep 30, 2009 4:19 PM (in response to concombremasqué)Your config looks fine. I'm not sure how a consumer could connect to a queue and not pick up messages sent to it...
Could you attach a screen shot that shows the consumer details and another with the queue details?
Thanks,
-Gio
-
4. Re: Fail to consume messages from remote machine
concombremasqué Oct 1, 2009 4:07 AM (in response to gseben)Here are the details you asked for (queue and consumer).
-
consumer_details_2.JPG 86.4 KB
-
consumer_details_1.JPG 68.1 KB
-
queue_details_1.JPG 68.0 KB
-
-
5. Re: Fail to consume messages from remote machine
concombremasqué Oct 1, 2009 9:26 AM (in response to concombremasqué)Just for information:
For testing purpose, I've changed the broker from ActiveMQ to OpenJMS and the issue does not show up (i.e.: I can consume messages from a distant machine).
What conclusion can be drawn here? Is it a bug in ActiveMQ 5.3.0.3 (in this case it would be a huge bug and I cannot believe that) or a problem in my ActiveMQ configuration (but it seems fine: refer to my previous post to look at it)?
-
6. Re: Fail to consume messages from remote machine
concombremasqué Oct 1, 2009 10:23 AM (in response to concombremasqué)After further investigations, it appears ActiveMQ is not the real issue as I manage to post/consume messages using distant machines and sample JMS sender/receiver test programs.
The issue is then related to the way my bundles, that make use of the camel activemq component, post JMS messages into the broker. There's something weird here...
Keep investigating...
-
7. Re: Fail to consume messages from remote machine
gseben Oct 1, 2009 10:31 AM (in response to concombremasqué)From your screenshots it seems that messages are being dequeued from the workflow.input and enqueued in the DLQ.workflow.input queue. Have you tried receiving from the DLQ to see what the messages in there are?
Are you setting a time to live on these messages? If so, how long?
-Gio
-
8. Re: Fail to consume messages from remote machine
concombremasqué Oct 1, 2009 1:31 PM (in response to gseben)Hi Gio,
Yes messages are enqueued in DLQ because my consumer fails to "see" them in the workflow.input queue. Messages in the DLQ are all correct messages (content and structure ok).
And everything works fine when my consumer is on the same machine as the ESB+ActiveMQ. And no there is no TTL set on the messages.
What I said in another of my posts is that I have the feeling that there is some problem in the way my bundles post messages in the queue. The messages are posted using camel activemq component (I use camel 1.6.1.0). Is this possible that this strange behaviour could be due to some issue solved in later camel versions (1.6.1.1 or 1.6.1.2)?
What leads me to believe such a thing is that I sent some messages directly into ActiveMQ queue (not through my bundles that make use of camel-activemq) and in this case I am able to consume these messages from a distant machine.
Maybe I should forward this post and my thoughts in the Fuse Mediation Router sub-forum...
-
9. Re: Fail to consume messages from remote machine
concombremasqué Oct 2, 2009 7:10 AM (in response to concombremasqué)Ok. I have some news.
I can observe that when I successfully consume messages (case where ESB+ActiveMQ and my consumer program are running on the same machine) the "Dispatched Queue" counter always remains set to 0 and the "Dequeues" counter is correct. Everything is fine in this case (refer to consumers_success.jpg screenshot).
When I run my consumer program from a different machine, then the program does not consume anything, yet messages are posted in the right queue. What can be seen then is that the "Dispatched Queue" counter is incremented whereas "Dequeues" counter is 0.
What's the meaning of that?
Again thanks as I am really stuck on this issue.
-
consumers_failure.jpg 165.4 KB
-
consumers_success.jpg 165.1 KB
-
-
10. Re: Fail to consume messages from remote machine
gseben Oct 2, 2009 11:21 AM (in response to concombremasqué)For an explanation on what the dispatch queue is check out: http://activemq.apache.org/scaling-the-depth-of-a-queue.html
This is not unique to the consumer but to the destination that the consumer is listening on.
The dispatch count keeps track of the number of messages that were sent to the consumer by the broker, while the dequeue count increases when the consumer sends and ack back to the broker for the message that it received.
So from the looks of it, the broker attempts to send a message to your consumer but for some reason the consumer finds that it cannot ack the messaged and it ends up in the DLQ. This looked to me like there was a time to live on the message where the consumer gets a expired message.
What does your camel route look like?
-Gio
P.S: Use jconsole instead of the webconsole. You will get better visibility into things.
-
11. Re: Fail to consume messages from remote machine
concombremasqué Oct 2, 2009 11:32 AM (in response to gseben)My camel route:
<endpoint id="workflowInputEndpoint" uri="jms:queue:$" />
-
12. Re: Fail to consume messages from remote machine
concombremasqué Oct 2, 2009 11:41 AM (in response to gseben)As a side note I should also bring this to you:
If I bypass the camel-jms component and send the message into the queue using direct calls to the JMS API in a pojo called by my camel route then it works fine. Strange isn't it?
-
13. Re: Fail to consume messages from remote machine
concombremasqué Oct 2, 2009 12:10 PM (in response to gseben)It seems you are right regarding the TTL. But its value is huge enough to be able to pick the message (Header 'Expiration' is set to 1254499608359 in the last message sent in my queue).
How can I disable TTL in camel-jms? (I tried in the JmsComponent bean declaration but it does not help)
-
14. Re: Fail to consume messages from remote machine
gseben Oct 2, 2009 12:29 PM (in response to concombremasqué)That time stamp looks to be in epoch time. But it seems to have three extra digits at the end. Must be part of a convention used by AMQ, my guess is that it represents the the timezone. Anyway, if you remove the last three digits from it you get: 1254499608 = Fri 02 Oct 2009 12:06:48 PM EDT (my timezone).
I'm not sure how to disable this in camel.
Another thing to keep in mind is that if there is a time difference in the clocks between the two machines (unrelated to timezone), then even if this time is large it will make the message expire.
-Gio