You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by gaohoward <gi...@git.apache.org> on 2016/04/06 15:01:40 UTC

[GitHub] activemq-artemis pull request: ARTEMIS-468 Fix openwire redelivery...

GitHub user gaohoward opened a pull request:

    https://github.com/apache/activemq-artemis/pull/440

    ARTEMIS-468 Fix openwire redelivery related regressions under integration-tests

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gaohoward/activemq-artemis apache_master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/440.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 #440
    
----
commit f30749e90e41a270de564145356c56206f65200b
Author: Howard Gao <ho...@gmail.com>
Date:   2016-04-06T12:59:57Z

    ARTEMIS-468 Fix openwire redelivery related regressions under integration-tests

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request: ARTEMIS-468 Fix openwire redelivery...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on the pull request:

    https://github.com/apache/activemq-artemis/pull/440#issuecomment-207029891
  
    @gaohoward  I have merged with my commit ammending this. if you could take a look please?
    
    if you need to amend the rule at least we have a single place to do that now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request: ARTEMIS-468 Fix openwire redelivery...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/440#discussion_r58897288
  
    --- Diff: artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java ---
    @@ -303,6 +307,22 @@ public void setPrefetchSize(int prefetchSize) {
           }
        }
     
    +   @Override
    +   public void updateForCanceledRef(MessageReference ref) {
    +      long seqId = ref.getMessage().getMessageID();
    +      long lastDelSeqId = info.getLastDeliveredSequenceId();
    +      ServerMessage coreMessage = ref.getMessage();
    +      int redeliveryCounter = coreMessage.getIntProperty(OpenWireMessageConverter.AMQ_MSG_REDELIVER_COUNTER);
    +      if (openwireDestination.isTopic()) {
    +         redeliveryCounter++;
    +         coreMessage.putIntProperty(OpenWireMessageConverter.AMQ_MSG_REDELIVER_COUNTER, redeliveryCounter);
    --- End diff --
    
    This is wrong anyways Howard, The same message could be delivered to another Queue (another topic for instance).
    
    DeliveryCount is a property of the MessageReference, not message.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request: ARTEMIS-468 Fix openwire redelivery...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/440


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request: ARTEMIS-468 Fix openwire redelivery...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/440#discussion_r58887712
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ConsumerListener.java ---
    @@ -0,0 +1,23 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements. See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License. You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.activemq.artemis.core.server;
    +
    +/**
    + */
    --- End diff --
    
    I don't like this...
    
    We have the SessionCallback to support protocol specific things.
    
    the protocolData should be accessed by Protocol specific classes only only. We shouldn't be doing any sort of weird conversions here. 
    
    I'm trying to keep the implementation clean and easy to understand.
    
    Add a method on SessionCallback:
    
    canceledDelivery(ServerConsumer, MessageReference, boolean failed);
    
    And simply call:
    
    callback.canceledDelivery(this, ref, failed) from ServerConsumer where you were calling ConsumerListener,
    
    
    And remove this interface please.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request: ARTEMIS-468 Fix openwire redelivery...

Posted by gaohoward <gi...@git.apache.org>.
Github user gaohoward commented on the pull request:

    https://github.com/apache/activemq-artemis/pull/440#issuecomment-206384358
  
    look like Jenkins has a memory problem.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---