[jira] [Commented] (ARTEMIS-1812) [core] Any Subsequent messages are lost after queue is emptied from slave broker (succ failover from master kill)
[ https://issues.apache.org/jira/browse/ARTEMIS-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16443591#comment-16443591 ] ASF GitHub Bot commented on ARTEMIS-1812: - Github user stanlyDoge commented on the issue: https://github.com/apache/activemq-artemis/pull/2020 Aha, thanks for explanation! > [core] Any Subsequent messages are lost after queue is emptied from slave > broker (succ failover from master kill) > - > > Key: ARTEMIS-1812 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1812 > Project: ActiveMQ Artemis > Issue Type: Bug > Environment: single HA pair - failover to slave > Core protocol >Reporter: Stanislav Knot >Assignee: Stanislav Knot >Priority: Blocker > > # Form HA pair (with auto-create) > # Send 10 messages via Core protocol > # Kill master broker > # Receive 10 messages from this Core queue > # Observe that queue is removed, but address is present (via hawtio f.e.) > # Send few messages to this Core queue again -> No messages are received by > broker, they seem to be lost in time & space -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1812) [core] Any Subsequent messages are lost after queue is emptied from slave broker (succ failover from master kill)
[ https://issues.apache.org/jira/browse/ARTEMIS-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16442715#comment-16442715 ] ASF GitHub Bot commented on ARTEMIS-1812: - Github user clebertsuconic commented on the issue: https://github.com/apache/activemq-artemis/pull/2020 I sent a commit to close this PR. definitely a won't fix. > [core] Any Subsequent messages are lost after queue is emptied from slave > broker (succ failover from master kill) > - > > Key: ARTEMIS-1812 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1812 > Project: ActiveMQ Artemis > Issue Type: Bug > Environment: single HA pair - failover to slave > Core protocol >Reporter: Stanislav Knot >Assignee: Stanislav Knot >Priority: Blocker > > # Form HA pair (with auto-create) > # Send 10 messages via Core protocol > # Kill master broker > # Receive 10 messages from this Core queue > # Observe that queue is removed, but address is present (via hawtio f.e.) > # Send few messages to this Core queue again -> No messages are received by > broker, they seem to be lost in time & space -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1812) [core] Any Subsequent messages are lost after queue is emptied from slave broker (succ failover from master kill)
[ https://issues.apache.org/jira/browse/ARTEMIS-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16442714#comment-16442714 ] ASF GitHub Bot commented on ARTEMIS-1812: - Github user asfgit closed the pull request at: https://github.com/apache/activemq-artemis/pull/2020 > [core] Any Subsequent messages are lost after queue is emptied from slave > broker (succ failover from master kill) > - > > Key: ARTEMIS-1812 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1812 > Project: ActiveMQ Artemis > Issue Type: Bug > Environment: single HA pair - failover to slave > Core protocol >Reporter: Stanislav Knot >Assignee: Stanislav Knot >Priority: Blocker > > # Form HA pair (with auto-create) > # Send 10 messages via Core protocol > # Kill master broker > # Receive 10 messages from this Core queue > # Observe that queue is removed, but address is present (via hawtio f.e.) > # Send few messages to this Core queue again -> No messages are received by > broker, they seem to be lost in time & space -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1812) [core] Any Subsequent messages are lost after queue is emptied from slave broker (succ failover from master kill)
[ https://issues.apache.org/jira/browse/ARTEMIS-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16442713#comment-16442713 ] ASF GitHub Bot commented on ARTEMIS-1812: - Github user jbertram commented on the issue: https://github.com/apache/activemq-artemis/pull/2020 I think this may be a misunderstanding about how the core client works vs. the other protocols. The core client is very simple. It doesn't support address/queue auto-create and auto-delete. That functionality is handled by each protocol independently. > [core] Any Subsequent messages are lost after queue is emptied from slave > broker (succ failover from master kill) > - > > Key: ARTEMIS-1812 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1812 > Project: ActiveMQ Artemis > Issue Type: Bug > Environment: single HA pair - failover to slave > Core protocol >Reporter: Stanislav Knot >Assignee: Stanislav Knot >Priority: Blocker > > # Form HA pair (with auto-create) > # Send 10 messages via Core protocol > # Kill master broker > # Receive 10 messages from this Core queue > # Observe that queue is removed, but address is present (via hawtio f.e.) > # Send few messages to this Core queue again -> No messages are received by > broker, they seem to be lost in time & space -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1812) [core] Any Subsequent messages are lost after queue is emptied from slave broker (succ failover from master kill)
[ https://issues.apache.org/jira/browse/ARTEMIS-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16442687#comment-16442687 ] ASF GitHub Bot commented on ARTEMIS-1812: - Github user clebertsuconic commented on the issue: https://github.com/apache/activemq-artemis/pull/2020 this is a won't fix.. close it please! > [core] Any Subsequent messages are lost after queue is emptied from slave > broker (succ failover from master kill) > - > > Key: ARTEMIS-1812 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1812 > Project: ActiveMQ Artemis > Issue Type: Bug > Environment: single HA pair - failover to slave > Core protocol >Reporter: Stanislav Knot >Assignee: Stanislav Knot >Priority: Blocker > > # Form HA pair (with auto-create) > # Send 10 messages via Core protocol > # Kill master broker > # Receive 10 messages from this Core queue > # Observe that queue is removed, but address is present (via hawtio f.e.) > # Send few messages to this Core queue again -> No messages are received by > broker, they seem to be lost in time & space -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1812) [core] Any Subsequent messages are lost after queue is emptied from slave broker (succ failover from master kill)
[ https://issues.apache.org/jira/browse/ARTEMIS-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16442684#comment-16442684 ] clebert suconic commented on ARTEMIS-1812: -- HA with auto-create is not a good idea... I will close it as won't fix... this would bring performance implications to have producer always verifying the existence of a queue.. what goes against a lot of semantics we have. this is a won't fix. just pre-create your address > [core] Any Subsequent messages are lost after queue is emptied from slave > broker (succ failover from master kill) > - > > Key: ARTEMIS-1812 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1812 > Project: ActiveMQ Artemis > Issue Type: Bug > Environment: single HA pair - failover to slave > Core protocol >Reporter: Stanislav Knot >Assignee: Stanislav Knot >Priority: Blocker > > # Form HA pair (with auto-create) > # Send 10 messages via Core protocol > # Kill master broker > # Receive 10 messages from this Core queue > # Observe that queue is removed, but address is present (via hawtio f.e.) > # Send few messages to this Core queue again -> No messages are received by > broker, they seem to be lost in time & space -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1812) [core] Any Subsequent messages are lost after queue is emptied from slave broker (succ failover from master kill)
[ https://issues.apache.org/jira/browse/ARTEMIS-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16442558#comment-16442558 ] ASF GitHub Bot commented on ARTEMIS-1812: - 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 = 12) + 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. > [core] Any Subsequent messages are lost after queue is emptied from slave > broker (succ failover from master kill) > - > > Key: ARTEMIS-1812 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1812 > Project: ActiveMQ Artemis > Issue Type: Bug > Environment: single HA pair - failover to slave > Core protocol >Reporter: Stanislav Knot >Assignee: Stanislav Knot >Priority: Blocker > > # Form HA pair (with auto-create) > # Send 10 messages via Core protocol > # Kill master broker > # Receive 10 messages from this Core queue > # Observe that queue is removed, but address is present (via hawtio f.e.) > # Send few messages to this Core queue again -> No messages are received by > broker, they seem to be lost in time & space -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1812) [core] Any Subsequent messages are lost after queue is emptied from slave broker (succ failover from master kill)
[ https://issues.apache.org/jira/browse/ARTEMIS-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16442555#comment-16442555 ] ASF GitHub Bot commented on ARTEMIS-1812: - Github user clebertsuconic commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2020#discussion_r182438794 --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java --- @@ -658,6 +658,9 @@ private void onSessionSend(Packet packet) { try { final SessionSendMessage message = (SessionSendMessage) packet; requiresResponse = message.isRequiresResponse(); +if (this.session.getMatchingQueue(message.getMessage().getAddressSimpleString(), RoutingType.ANYCAST) == null || this.session.getMatchingQueue(message.getMessage().getAddressSimpleString(), RoutingType.MULTICAST) == null) { --- End diff -- This will kill performance.. we cannot accept this Matcing Queue on every onSessionSend.. not happening > [core] Any Subsequent messages are lost after queue is emptied from slave > broker (succ failover from master kill) > - > > Key: ARTEMIS-1812 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1812 > Project: ActiveMQ Artemis > Issue Type: Bug > Environment: single HA pair - failover to slave > Core protocol >Reporter: Stanislav Knot >Assignee: Stanislav Knot >Priority: Blocker > > # Form HA pair (with auto-create) > # Send 10 messages via Core protocol > # Kill master broker > # Receive 10 messages from this Core queue > # Observe that queue is removed, but address is present (via hawtio f.e.) > # Send few messages to this Core queue again -> No messages are received by > broker, they seem to be lost in time & space -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1812) [core] Any Subsequent messages are lost after queue is emptied from slave broker (succ failover from master kill)
[ https://issues.apache.org/jira/browse/ARTEMIS-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16442534#comment-16442534 ] ASF GitHub Bot commented on ARTEMIS-1812: - Github user stanlyDoge commented on the issue: https://github.com/apache/activemq-artemis/pull/2020 While sending AMQP message, addReceiver() is called, which causes creating a queue. While sending openwire message, addConsumer() is called, which also causes creating a queue. But core message is directly sent to queue. It may happen this queue does not exist and message is lost. > [core] Any Subsequent messages are lost after queue is emptied from slave > broker (succ failover from master kill) > - > > Key: ARTEMIS-1812 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1812 > Project: ActiveMQ Artemis > Issue Type: Bug > Environment: single HA pair - failover to slave > Core protocol >Reporter: Stanislav Knot >Assignee: Stanislav Knot >Priority: Blocker > > # Form HA pair (with auto-create) > # Send 10 messages via Core protocol > # Kill master broker > # Receive 10 messages from this Core queue > # Observe that queue is removed, but address is present (via hawtio f.e.) > # Send few messages to this Core queue again -> No messages are received by > broker, they seem to be lost in time & space -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1812) [core] Any Subsequent messages are lost after queue is emptied from slave broker (succ failover from master kill)
[ https://issues.apache.org/jira/browse/ARTEMIS-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16440893#comment-16440893 ] ASF GitHub Bot commented on ARTEMIS-1812: - Github user clebertsuconic commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2020#discussion_r182086148 --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java --- @@ -829,7 +829,13 @@ public RoutingStatus route(final Message message, // TODO auto-create queues here? // first check for the auto-queue creation thing - if (bindings == null) { + if (bindings == null && !address.toString().equals("activemq.notifications")) { --- End diff -- This seems a symptom of another issue instead of a proper fix. it seems you are fixing a symptom of another issue. Accepting this fix will probably hide a real issue somewhere else. Can you replicate this on a test.. so we can validate the real issue? > [core] Any Subsequent messages are lost after queue is emptied from slave > broker (succ failover from master kill) > - > > Key: ARTEMIS-1812 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1812 > Project: ActiveMQ Artemis > Issue Type: Bug > Environment: single HA pair - failover to slave > Core protocol >Reporter: Stanislav Knot >Assignee: Stanislav Knot >Priority: Blocker > > # Form HA pair (with auto-create) > # Send 10 messages via Core protocol > # Kill master broker > # Receive 10 messages from this Core queue > # Observe that queue is removed, but address is present (via hawtio f.e.) > # Send few messages to this Core queue again -> No messages are received by > broker, they seem to be lost in time & space -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1812) [core] Any Subsequent messages are lost after queue is emptied from slave broker (succ failover from master kill)
[ https://issues.apache.org/jira/browse/ARTEMIS-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16440331#comment-16440331 ] ASF GitHub Bot commented on ARTEMIS-1812: - Github user gaohoward commented on the issue: https://github.com/apache/activemq-artemis/pull/2020 @stanlyDoge I think that may be fixed somewhere else probably? can you provide your test? > [core] Any Subsequent messages are lost after queue is emptied from slave > broker (succ failover from master kill) > - > > Key: ARTEMIS-1812 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1812 > Project: ActiveMQ Artemis > Issue Type: Bug > Environment: single HA pair - failover to slave > Core protocol >Reporter: Stanislav Knot >Assignee: Stanislav Knot >Priority: Blocker > > # Form HA pair (with auto-create) > # Send 10 messages via Core protocol > # Kill master broker > # Receive 10 messages from this Core queue > # Observe that queue is removed, but address is present (via hawtio f.e.) > # Send few messages to this Core queue again -> No messages are received by > broker, they seem to be lost in time & space -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1812) [core] Any Subsequent messages are lost after queue is emptied from slave broker (succ failover from master kill)
[ https://issues.apache.org/jira/browse/ARTEMIS-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16439470#comment-16439470 ] ASF GitHub Bot commented on ARTEMIS-1812: - GitHub user stanlyDoge opened a pull request: https://github.com/apache/activemq-artemis/pull/2020 ARTEMIS-1812 fix for missing (core) messages after master kill (HA) When I try to send some core messages to slave broker (master is dead), messages are lost. Debug console says "Couldn't find any bindings for address=TEST.foo". By digging into code, I think this is the spot, which is responsible for this bug: https://github.com/apache/activemq-artemis/blob/master/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java#L832 I have tried to create queue with default values here. It fixes the bug, but i am afraid it can create much more new bugs. Git blame says @clebertsuconic and @jbertram could know more about this. Can you guys please approve/disprove this fix? If it is ok, please do not merge, I would like to bring some test for this and delete comments. Thank you. You can merge this pull request into a Git repository by running: $ git pull https://github.com/stanlyDoge/activemq-artemis ARTEMIS-1812 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/activemq-artemis/pull/2020.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2020 commit 688397ea74897d5ad49d4694a74c14849148b8de Author: Stanislav Knot Date: 2018-04-16T13:46:22Z ARTEMIS-1812 fix for missing (core) messages after master kill (HA) > [core] Any Subsequent messages are lost after queue is emptied from slave > broker (succ failover from master kill) > - > > Key: ARTEMIS-1812 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1812 > Project: ActiveMQ Artemis > Issue Type: Bug > Environment: single HA pair - failover to slave > Core protocol >Reporter: Stanislav Knot >Assignee: Stanislav Knot >Priority: Blocker > > # Form HA pair (with auto-create) > # Send 10 messages via Core protocol > # Kill master broker > # Receive 10 messages from this Core queue > # Observe that queue is removed, but address is present (via hawtio f.e.) > # Send few messages to this Core queue again -> No messages are received by > broker, they seem to be lost in time & space -- This message was sent by Atlassian JIRA (v7.6.3#76005)