Hi Andrew,
can you please provide a JUnit test that reproduces the problems you
described (no reordering, missing messages etc.)? Just attach a running
example to a JIRA issue.
Andrew Harvey schrieb:
Hi there,
I've been battling for a few days to get a resequencer working with ActiveMQ
based on message priority. I'm hoping I might be able to get some help.
First off the issue was that the route wasn't being registered at all. That was fixed when
I found that all the documentation I had found for the resequencer EIP and the spring
documentation was wrong, and that one shouldn't use the <resequencer /> element, but
the <resequence /> element. This is at least the case for my install of Camel which
came with ActiveMQ 5.3 (I believe it is version 2.0.0). That was a fun couple of hours of
tearing my hair out before I went and read the xsd to check that I was doing it right.
Now, I'm having issues getting the resequencer to work as I expect it to. What I
currently have in my <camelContext /> is this:
<route>
<from uri="activemq:queue:AnalysisIn" />
<resequence>
<simple>in.header.JMSpriority</simple>
<to uri="activemq:queue:AnalysisOut" />
<batch-config batchSize="200" batchTimeout="4000" />
</resequence>
</route>
Now I've followed the documentation there, and messages do flow from the <from />
queue to the <to /> queue, but not with any reliability, and apparently no
re-ordering.
I'm using pyactivemq to pump messages in using the stomp transport, with
priority ranging from 0-9, and I'm adding messages every 0.1 seconds. I put 354
messages into the queue and only 27 make it to the other side. I'm not quite
sure what I'm doing wrong there. Furthermore, when I do look at the messages,
they do not appear to have been resequenced. I'll happily put this down to me
not correctly specifying the header, but I'm stuffed if I know how to.
I'm quite new to both ActiveMQ and Camel, and am not the most comfortable
person when it comes to Java, so I'm poking around in the dark for the mostpart
– any help I can get would be most appreciated.
Andrew
Andrew Harvey / Developer
lexer
m/
t/ +61 2 9019 6379
w/ http://lexer.com.au
Please consider the environment before printing this email
This email transmission is confidential and intended solely for the person or
organisation to whom it is addressed. If you are not the intended recipient,
you must not copy, distribute or disseminate the information, or take any
action in relation to it and please delete this e-mail. Any views expressed in
this message are those of the individual sender, except where the send
specifically states them to be the views of any organisation or employer. If
you have received this message in error, do not open any attachment but please
notify the sender (above). This message has been checked for all known viruses
powered by McAfee.
For further information visit http://www.mcafee.com/us/threat_center/default.asp
Please rely on your own virus check as no responsibility is taken by the sender
for any damage rising out of any virus infection this communication may contain.
This message has been scanned for malware by Websense. www.websense.com