activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuconic <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #2020: ARTEMIS-1812 fix for missing (core) mes...
Date Wed, 18 Apr 2018 14:07:30 GMT
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2020#discussion_r182439370
  
    --- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java
---
    @@ -1641,6 +1642,55 @@ public void testFailThenReceiveMoreMessagesAfterFailover() throws
Exception {
           receiveDurableMessages(consumer);
        }
     
    +   @Test(timeout = 120000)
    +   public void testLiveKilledBackupReceivesCoreMessage() throws Exception {
    +      createSessionFactory();
    +      SimpleString lalaQ = new SimpleString("lalaQ");
    +
    +      ClientSession session = createSession(sf, true, true);
    +
    +      AddressSettings addressSettings = new AddressSettings();
    +      addressSettings.setAutoDeleteQueues(true).setAutoCreateQueues(true);
    +      backupServer.getServer().getConfiguration().addAddressesSetting(lalaQ.toString(),
addressSettings);
    +
    +      session.createQueue(lalaQ, RoutingType.MULTICAST, lalaQ, null, true);
    +
    +      ClientProducer producer = session.createProducer(lalaQ);
    +
    +      producer.send(createMessage(session, 0, true));
    +      producer.send(createMessage(session, 1, true));
    +
    +      ClientConsumer consumer = session.createConsumer(lalaQ, true);
    +
    +      session.start();
    +
    +      ClientMessage message = consumer.receive(1000);
    +      Assert.assertNotNull(message);
    +
    +      crash(session);
    +
    +      message = consumer.receive(1000);
    +      Assert.assertNotNull(message);
    +      message.acknowledge();
    +
    +      message = consumer.receive(1000);
    +      Assert.assertNotNull(message);
    +      message.acknowledge();
    +
    +      message = consumer.receive(1000);
    +      Assert.assertNull(message);
    +
    +
    +      //queue should be destroyed after consuming all messages
    +      backupServer.getServer().getActiveMQServerControl().destroyQueue(lalaQ.toString(),
true);
    --- End diff --
    
    The issue is on auto-created queues?
    
    
    if you need persistent queues and failover.. create them... I wouldn't fix this.


---

Mime
View raw message