You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Chris Hofstaedter (JIRA)" <ji...@apache.org> on 2007/11/09 02:59:22 UTC
[jira] Commented: (AMQ-1487) Bug in ActiveMQSession::send()
prevents non-persistent messages from being sent sync
[ https://issues.apache.org/activemq/browse/AMQ-1487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40578 ]
Chris Hofstaedter commented on AMQ-1487:
----------------------------------------
Wow, that was some bad copy/paste work. sorry. Redoing the before/after code below:
Before:
if (!msg.isPersistent() || connection.isUseAsyncSend() || txid!=null)) {
this.connection.asyncSendPacket(msg);
} else {
this.connection.syncSendPacket(msg);
}
After:
if(!msg.isResponseRequired() && (!msg.isPersistent() || connection.isUseAsyncSend() || txid!=null)) {
this.connection.asyncSendPacket(msg);
} else {
this.connection.syncSendPacket(msg);
}
> Bug in ActiveMQSession::send() prevents non-persistent messages from being sent sync
> ------------------------------------------------------------------------------------
>
> Key: AMQ-1487
> URL: https://issues.apache.org/activemq/browse/AMQ-1487
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 4.0.2
> Environment: Windows XP, AMQ 4.0.2, Client side non-peristent but response-required message producer to an embedded broker with a failover demand forwarding bridge to a persisting broker (persisting broker has a custom broker filter to mark all incoming messages as persistent).
> Reporter: Chris Hofstaedter
>
> I have not tested this issue against any version other than 4.0.2.
> ActiveMQSession::send() contains the following code:
> if(!msg.isPersistent() || connection.isUseAsyncSend() || txid!=null) {
> this.connection.asyncSendPacket(msg);
> } else {
> this.connection.syncSendPacket(msg);
> }
> This predicate short-circuits if the message is non-persistent and sends the message async even if the message is marked with "Response Required".
> Modified the predicate to:
> if(!msg.isResponseRequired() && (!msg.isPersistent() || connection.isUseAsyncSend() || txid!=null)) {
> this.connection.asyncSendPacket(msg);
> } else {
> this.connection.syncSendPacket(msg);
> }
> This local patch resolved my issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.