-
1. Re: Can Core Bridge don't discard expired message?
ataylor Aug 23, 2011 9:12 AM (in response to shooeugenesea.tw)1 of 1 people found this helpfulcan you raise a feature request for this in JIRA
-
2. Re: Can Core Bridge don't discard expired message?
shooeugenesea.tw Aug 23, 2011 10:25 PM (in response to ataylor)I created a feature reuqest: https://issues.jboss.org/browse/HORNETQ-758
Thanks
-
3. Re: Can Core Bridge don't discard expired message?
clebert.suconic Aug 24, 2011 11:14 AM (in response to shooeugenesea.tw)Do you think you could produce a testcase. I'm still not convinced this is the expire queue on the bridge...
it may be something wrong.. but if you produce a test, it would be easier to work the issue with a fix.
-
4. Re: Can Core Bridge don't discard expired message?
shooeugenesea.tw Aug 24, 2011 12:25 PM (in response to clebert.suconic)Hi,
I can produce a testcase.
I attached the file: HornetQClusterLoseMessage.zip, includes environment and test codes
when I post the issue: http://community.jboss.org/thread/170926?tstart=0
I think the expired message is discard by HornetQ's internal core bridge is because when I setup the expiry-address in the core bridge,
then the message will be dispatched to the specified expiry-address.
For example, my cluster connection's name is "my-cluster", and I know the HornetQ's internal core bridge name is "sf.my-cluster.0".
So I can setup expiry-address, such as "jms.queue.expirymessages" for the "sf.my-cluster.#",
then all messages which is discard by the HornetQ's internal core bridge will be dispatched to the specified queue.
Thanks!!
-
5. Re: Can Core Bridge don't discard expired message?
clebert.suconic Aug 25, 2011 9:40 PM (in response to shooeugenesea.tw)Can you try Branch_2_2_EAP please? (as a test.. since you have your environment ready)
There was an issue on cleaning internal properties what would lead to losing messages. I just had an aha moment here and I think that's what's happening to you. if that's the case it's already fixed.
I don't see any special treatment for expired messages on the bridge. The only thing that would lead into that was the issue that was already fixed.
-
6. Re: Can Core Bridge don't discard expired message?
shooeugenesea.tw Aug 25, 2011 10:16 PM (in response to clebert.suconic)I'll post the test result here after I test the branch,
but I need to find a solution for my current situation first.
Thanks for your response!
-
7. Re: Can Core Bridge don't discard expired message?
clebert.suconic Aug 25, 2011 10:59 PM (in response to shooeugenesea.tw)If that's the situation, you can apply a 3 lines patch to the current version you are using.
-
8. Re: Can Core Bridge don't discard expired message?
clebert.suconic Aug 25, 2011 11:01 PM (in response to clebert.suconic)Actually, if you download the code for the version you are using:
Go to PostOfficeImpl::cleanupInternalProperties, and change it to:
/**
* @param message
*/
protected void cleanupInternalPropertiesBeforeRouting(final ServerMessage message)
{
LinkedList<SimpleString> valuesToRemove = null;
for (SimpleString name : message.getPropertyNames())
{
// We use properties to establish routing context on clustering.
// However if the client resends the message after receiving, it needs to be removed
if (name.startsWith(MessageImpl.HDR_ROUTE_TO_IDS) && !name.equals(MessageImpl.HDR_ROUTE_TO_IDS))
{
if (valuesToRemove == null)
{
valuesToRemove = new LinkedList<SimpleString>();
}
valuesToRemove.add(name);
}
}
if (valuesToRemove != null)
{
for (SimpleString removal : valuesToRemove)
{
message.removeProperty(removal);
}
}
}
-
9. Re: Can Core Bridge don't discard expired message?
clebert.suconic Aug 25, 2011 11:26 PM (in response to clebert.suconic)Or even easier.. if you see any ConcurrentModificationException on your logs.. that's the issue!
-
10. Re: Can Core Bridge don't discard expired message?
shooeugenesea.tw Aug 26, 2011 12:14 AM (in response to clebert.suconic)Unfortunately, I'm using HornetQ-2.1.2.Final.
I checked the PostOfficeImpl, the logic to cleanup internal properties before routing is not added into HornetQ-2.1.2.Final yet.
So I think my situation is different from the ConcurrentModificationException issue.
Thanks!
-
11. Re: Can Core Bridge don't discard expired message?
clebert.suconic Aug 26, 2011 2:39 AM (in response to shooeugenesea.tw)Well, I don't think this would happen on 2.2.+.
I believe the issue on 2.1.2 is related to not cleaning the properties for clustering before routing, hence the messages are lost.
You could maybe add the cleaning routine on routing.
Can't you move to 2.2.x?
-
12. Re: Can Core Bridge don't discard expired message?
shooeugenesea.tw Aug 26, 2011 7:37 PM (in response to clebert.suconic)1 of 1 people found this helpfulI'll provide a workaround for my current situation, and I'll test HornetQ-2.2.x.
I'll post test result here.
Thanks for your help!
-
13. Re: Can Core Bridge don't discard expired message?
shooeugenesea.tw Aug 29, 2011 5:58 AM (in response to shooeugenesea.tw)Yeah~ it works!!
Thank you~!!