Applied and tested, all tests still passing after this change.
This commit is contained in:
Timothy Bish 2014-09-09 14:19:39 -04:00
parent 7ca25965db
commit c70d75213e
1 changed files with 11 additions and 2 deletions

View File

@ -601,7 +601,7 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
LOG.trace("Inbound Message:{} from Producer:{}", message.getMessageId(), producerId + ":" + messageId.getProducerSequenceId());
DeliveryState remoteState = delivery.getRemoteState();
final DeliveryState remoteState = delivery.getRemoteState();
if (remoteState != null && remoteState instanceof TransactionalState) {
TransactionalState s = (TransactionalState) remoteState;
long txid = toLong(s.getTxnId());
@ -639,7 +639,16 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
receiver.flow(prefetch - receiver.getCredit());
}
if (remoteState != null && remoteState instanceof TransactionalState) {
TransactionalState txAccepted = new TransactionalState();
txAccepted.setOutcome(Accepted.getInstance());
txAccepted.setTxnId(((TransactionalState) remoteState).getTxnId());
delivery.disposition(txAccepted);
} else {
delivery.disposition(Accepted.getInstance());
}
delivery.settle();
}