This closes #1004
This commit is contained in:
commit
152b929b5a
|
@ -159,7 +159,7 @@ public class Artemis {
|
|||
withDefaultCommand(HelpAddress.class).withCommands(CreateAddress.class, DeleteAddress.class, UpdateAddress.class, ShowAddress.class);
|
||||
|
||||
if (instance != null) {
|
||||
builder.withGroup("data").withDescription("data tools group (print|exp|imp|exp|encode|decode|compact) (example ./artemis data print)").
|
||||
builder.withGroup("data").withDescription("data tools group (print|imp|exp|encode|decode|compact) (example ./artemis data print)").
|
||||
withDefaultCommand(HelpData.class).withCommands(PrintData.class, XmlDataExporter.class, XmlDataImporter.class, DecodeJournal.class, EncodeJournal.class, CompactJournal.class);
|
||||
builder.withGroup("user").withDescription("default file-based user management (add|rm|list|reset) (example ./artemis user list)").
|
||||
withDefaultCommand(HelpUser.class).withCommands(ListUser.class, AddUser.class, RemoveUser.class, ResetUser.class);
|
||||
|
|
|
@ -507,6 +507,11 @@ public class ProtonServerSenderContext extends ProtonInitializable implements Pr
|
|||
}
|
||||
}
|
||||
} else if (remoteState instanceof Accepted) {
|
||||
//this can happen in the twice ack mode, that is the receiver accepts and settles separately
|
||||
//acking again would show an exception but would have no negative effect but best to handle anyway.
|
||||
if (delivery.isSettled()) {
|
||||
return;
|
||||
}
|
||||
// we have to individual ack as we can't guarantee we will get the delivery updates
|
||||
// (including acks) in order
|
||||
// from dealer, a perf hit but a must
|
||||
|
|
|
@ -49,7 +49,7 @@ For a full list of data tools commands available use:
|
|||
```
|
||||
NAME
|
||||
artemis data - data tools group
|
||||
(print|exp|imp|exp|encode|decode|compact) (example ./artemis data print)
|
||||
(print|imp|exp|encode|decode|compact) (example ./artemis data print)
|
||||
|
||||
SYNOPSIS
|
||||
artemis data
|
||||
|
|
|
@ -627,4 +627,8 @@ public class AmqpMessage {
|
|||
message.setProperties(new Properties());
|
||||
}
|
||||
}
|
||||
|
||||
public void settle() {
|
||||
delivery.settle();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,6 +74,32 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
|
|||
connection.close();
|
||||
}
|
||||
|
||||
@Test(timeout = 60000)
|
||||
public void testAcceptWithoutSettling() throws Exception {
|
||||
AmqpClient client = createAmqpClient();
|
||||
AmqpConnection connection = addConnection(client.connect());
|
||||
AmqpSession session = connection.createSession();
|
||||
|
||||
AmqpReceiver receiver = session.createReceiver(getTestName());
|
||||
|
||||
sendMessages(getTestName(), 10);
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
receiver.flow(1);
|
||||
AmqpMessage receive = receiver.receive();
|
||||
receive.accept(false);
|
||||
receive.settle();
|
||||
}
|
||||
|
||||
receiver.close();
|
||||
connection.close();
|
||||
|
||||
Queue queue = getProxyToQueue(getTestName());
|
||||
assertNotNull(queue);
|
||||
assertEquals(0, queue.getMessageCount());
|
||||
}
|
||||
|
||||
|
||||
@Test(timeout = 60000)
|
||||
public void testCreateQueueReceiverWithJMSSelector() throws Exception {
|
||||
AmqpClient client = createAmqpClient();
|
||||
|
|
Loading…
Reference in New Issue