synchronize doMessageSend() to ensure messages are stored and dispatched

in the right order

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@587396 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2007-10-23 05:38:36 +00:00
parent d3d58fe41d
commit 569e5ca78c
1 changed files with 9 additions and 1 deletions

View File

@ -380,7 +380,15 @@ public class Topic extends BaseDestination {
}
}
void doMessageSend(final ProducerBrokerExchange producerExchange, final Message message) throws IOException, Exception {
/**
* do send the message - this needs to be synchronized to ensure messages are stored AND dispatched in
* the right order
* @param producerExchange
* @param message
* @throws IOException
* @throws Exception
*/
synchronized void doMessageSend(final ProducerBrokerExchange producerExchange, final Message message) throws IOException, Exception {
final ConnectionContext context = producerExchange.getConnectionContext();
message.setRegionDestination(this);