Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update branch up to OSS 6.1.4, included post release commit and update poms to 6.1.5-TT.1-SNAPSHOT #98

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
4cd12ae
AMQ-9493: Upgrade to maven-plugin-plugin 3.13.1
jbonofre May 13, 2024
102643e
AMQ-9547 - Remove setLength() and usage from RecoverableRandomAccessFile
cshannon Aug 8, 2024
2f44e8d
AMQ-8398 - Fix Stomp to OpenWire UTF-8 translation
cshannon Aug 28, 2024
8860dce
AMQ-8398 - Fix Stomp to Stomp Unicode UTF-8 test
cshannon Sep 4, 2024
f3cf668
AMQ-8398 - Add missing super.tearDown() call to Stomp NIOSSLLargeMess…
azotcsit Sep 4, 2024
b1545e2
Set cache-control to no-store by default for stronger security
kenliao94 Aug 23, 2024
bdc928d
AMQ-9557: Upgrade to commons-logging 1.3.4
jbonofre Sep 3, 2024
b21deae
AMQ-9510: Upgrade to jmock 2.13.1
jbonofre May 30, 2024
bf53eb8
AMQ-9491: Upgrade to ASM 9.7
jbonofre Apr 30, 2024
177fe60
Remove JDK_JAVA_OPTIONS usage in wrapper.conf. Moved to wrapper.java.…
Aug 28, 2024
bd992a2
AMQ-8122 - Fix DataByteArrayInputStreamTest
azotcsit Aug 31, 2024
b074fd1
AMQ-9568: Upgrade to ant 1.10.15
jbonofre Sep 11, 2024
9a50af7
AMQ-9567: Upgrade to jmdns 3.5.12
jbonofre Sep 11, 2024
789cb9c
AMQ-9494: Upgrade to maven-source-plugin 3.3.1
jbonofre May 13, 2024
3bf6d49
AMQ-9495: Upgrade to maven-assembly-plugin 3.7.1
jbonofre May 13, 2024
2c62c64
AMQ-9496: Upgrade to maven-compiler-plugin 3.13.0
jbonofre May 27, 2024
bb18dec
AMQ-9576: Upgrade to maven-clean-plugin 3.4.0
jbonofre Sep 23, 2024
ad35f00
AMQ-9574: Upgrade to commons-io 2.17.0
jbonofre Sep 23, 2024
70d2f8c
AMQ-9577: Upgrade to maven-enforcer-plugin 3.5.0
jbonofre Sep 23, 2024
d76c634
AMQ-9579: Upgrade to maven-javadoc-plugin 3.10.0
jbonofre Sep 23, 2024
06490ad
AMQ-9578: Upgrade to maven-jar-plugin 3.4.2
jbonofre Sep 23, 2024
9f5338f
AMQ-9580: Upgrade to maven-project-info-reports-plugin 3.7.0
jbonofre Sep 23, 2024
f1ed21d
AMQ-9581: Upgrade to maven-release-plugin 3.1.1
jbonofre Sep 23, 2024
a1ea7ba
AMQ-9582: Upgrade to maven-surefire-plugin 3.5.0
jbonofre Sep 23, 2024
ebde181
AMQ-9583: Upgrade to build-helper-maven-plugin 3.6.0
jbonofre Sep 23, 2024
cc7ff5d
AMQ-9584: Upgrade to javacc-maven-plugin 3.1.0
jbonofre Sep 23, 2024
72be048
AMQ-9585: Upgrade to taglist-maven-plugin 3.1.0
jbonofre Sep 23, 2024
d55d3c6
[AMQ-9595] Fix recoverNextMessages when there are messages consumed f…
NikitaShupletsov Oct 18, 2024
f831abf
AMQ-9614: Upgrade to cxf-xjc-plugin 4.0.2
jbonofre Oct 29, 2024
fc689df
AMQ-9615: Upgrade to maven-shade-plugin 3.6.0
jbonofre Oct 29, 2024
b077628
AMQ-9613: Upgrade to xbean 4.26
jbonofre Oct 31, 2024
39dbfa1
AMQ-9612: Upgrade to dependency-check-maven 11.0.0
jbonofre Oct 31, 2024
4820b57
AMQ-9611: Upgrade to taglist-maven-plugin 3.2.1
jbonofre Oct 31, 2024
281b621
AMQ-9610: Upgrade to maven-surefire-plugin 3.5.1
jbonofre Oct 31, 2024
3c48dfe
AMQ-9609: Upgrade to maven-project-info-reports-plugin 3.8.0
jbonofre Oct 31, 2024
00d4515
AMQ-9608: Upgrade to maven-plugin-plugin 3.15.1
jbonofre Oct 31, 2024
3512867
AMQ-9607: Upgrade to maven-javadoc-plugin 3.10.1
jbonofre Oct 31, 2024
36c0c90
AMQ-9605: Upgrade to ASM 9.7.1
jbonofre Nov 1, 2024
0858dfb
AMQ-9604: Upgrade to Camel 4.8.1
jbonofre Nov 1, 2024
af0cae1
AMQ-9603: Upgrade to Jackson 2.18.0
jbonofre Nov 1, 2024
1309348
AMQ-9612: Upgrade to dependency-check-maven 11.1.0
jbonofre Nov 2, 2024
c70c594
AMQ-9603: Upgrade to Jackson 2.18.1
jbonofre Nov 2, 2024
bc82c8c
Update spring.schemas version in preparation for 6.1.4 release
jbonofre Nov 7, 2024
e3fdd5e
AMQ-9618: Upgrade to velocity 2.4.1
jbonofre Nov 7, 2024
345fd0d
AMQ-9619: Upgrade to groovy 4.0.23
jbonofre Nov 7, 2024
8cfabea
AMQ-9620: Upgrade to maven-javadoc-plugin 3.11.1
jbonofre Nov 7, 2024
8a17333
AMQ-9621: Upgrade to maven-surefire-plugin 3.5.2
jbonofre Nov 7, 2024
af1d8be
[AMQ-9530] Fix SelectorAwareVirtualTopicInterceptor ClassCastExceptio…
NikitaShupletsov Jul 9, 2024
6193eec
AMQ-9622: Upgrade to log4j 2.24.1
jbonofre Nov 8, 2024
3496be9
AMQ-9617: Adjust consumers timeout to avoid race condition on RestTest
jbonofre Nov 8, 2024
d14f459
AMQ-9625 - Prevent queue messages from becoming stuck
cshannon Nov 20, 2024
a3c30b3
Update poms to 6.1.5-TT.1-SNAPSHOT
cesarhernandezgt Nov 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion activemq-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.3-TT.4-SNAPSHOT</version>
<version>6.1.5-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-all</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-amqp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.3-TT.4-SNAPSHOT</version>
<version>6.1.5-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-amqp</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-blueprint/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.3-TT.4-SNAPSHOT</version>
<version>6.1.5-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-blueprint</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-broker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.3-TT.4-SNAPSHOT</version>
<version>6.1.5-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-broker</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,20 @@ public synchronized boolean tryAddMessageLast(MessageReference node, long wait)
disableCache = true;
}

if (disableCache && isCacheEnabled()) {
// AMQ-9625 - use this.cacheEnabled directly because the method isCacheEnabled() is overriden
// to try to re-enable the cache which we don't want at this point as we already skipped
// adding it to the cache
if (disableCache && this.cacheEnabled) {
if (LOG.isTraceEnabled()) {
LOG.trace("{} - disabling cache on add {} {}", this, node.getMessageId(), node.getMessageId().getFutureOrSequenceLong());
}
syncWithStore(node.getMessage());
setCacheEnabled(false);
} else if (!this.cacheEnabled) {
// AMQ-9625 - Verify and wait on previous in flight async messages here if another
// thread triggered the cache to be disabled
// see the waitForAsyncMessage() method and Jira for more info
waitForAsyncMessage(node.getMessage());
}
size++;
return true;
Expand Down Expand Up @@ -319,6 +327,11 @@ private void syncWithStore(Message currentAdd) throws Exception {
break;
}

// AMQ-9625 - If we are disabling the cache and syncing the store then
// we need to wait for task to finish before updating the store batch
// see the waitForAsyncMessage() method and Jira for more info
waitForAsyncMessage(currentAdd);

MessageId candidate = lastCachedIds[ASYNC_ADD];
if (candidate != null) {
// ensure we don't skip current possibly sync add b/c we waited on the future
Expand Down Expand Up @@ -530,4 +543,38 @@ public String toString() {
public Subscription getSubscription() {
return null;
}

// AMQ-9625 - If the cache is disabled check if we need to wait for an async message
// to finish its task because the message is not being added to the cache.
// Normally, async messages will only be used if the cache is enabled so most of the time
// this check should not find any async messages to wait on if the cache is disabled
// and is basically a noop.
//
// However, while messages are being published, if the memory limit is reached the first
// thread that is adding the message that reaches the limit will disable the cache.
// This means there will be 1 or more potentially outstanding in flight adds that are
// queued up as async writes to the store.
//
// If the cache is disabled, we need to wait for any async message tasks to be
// finished otherwise there is a chance of missing the messages on dispatch
// when the queue pages in the next batch because store writes will finish after
// the store cursor has already moved ahead leading to a stuck message.
private void waitForAsyncMessage(Message node) {
// Note: isRecievedByDFBridge() was repurposed to be used to mark messages that
// are added to the store as async
if (node.getMessage().isRecievedByDFBridge()) {
final Object futureOrLong = node.getMessageId().getFutureOrSequenceLong();
if (futureOrLong instanceof Future) {
try {
((Future<?>) futureOrLong).get();
} catch (Exception exceptionOk) {
// We don't care if we get an exception (cancelled, etc) we just want
// to ensure the task is finished and not pending.
} finally {
LOG.trace("{} - future finished inside waitForAsyncMessage {} {}", this,
node.getMessageId(), futureOrLong);
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* 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.broker.region.virtual;

import org.apache.activemq.broker.region.BaseDestination;
import org.apache.activemq.broker.region.Destination;
import org.apache.activemq.broker.region.DestinationFilter;

import java.util.Optional;

public class BaseVirtualDestinationFilter extends DestinationFilter {

public BaseVirtualDestinationFilter(Destination next) {
super(next);
}

BaseDestination getBaseDestination(Destination virtualDest) {
if (virtualDest instanceof BaseDestination) {
return (BaseDestination) virtualDest;
} else if (virtualDest instanceof DestinationFilter) {
return ((DestinationFilter) virtualDest).getAdaptor(BaseDestination.class);
}
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
*/
package org.apache.activemq.broker.region.virtual;

import java.util.Optional;
import java.util.Set;

import org.apache.activemq.broker.ConnectionContext;
import org.apache.activemq.broker.region.BaseDestination;
import org.apache.activemq.broker.region.Destination;
import org.apache.activemq.broker.region.DestinationFilter;
import org.apache.activemq.broker.region.IndirectMessageReference;
import org.apache.activemq.broker.region.RegionBroker;
import org.apache.activemq.broker.region.Subscription;
Expand All @@ -34,7 +34,7 @@
* Creates a mapped Queue that can recover messages from subscription recovery
* policy of its Virtual Topic.
*/
public class MappedQueueFilter extends DestinationFilter {
public class MappedQueueFilter extends BaseVirtualDestinationFilter {

private final ActiveMQDestination virtualDestination;

Expand Down Expand Up @@ -87,15 +87,6 @@ public synchronized void addSubscription(ConnectionContext context, Subscription
}
}

private BaseDestination getBaseDestination(Destination virtualDest) {
if (virtualDest instanceof BaseDestination) {
return (BaseDestination) virtualDest;
} else if (virtualDest instanceof DestinationFilter) {
return ((DestinationFilter) virtualDest).getAdaptor(BaseDestination.class);
}
return null;
}

@Override
public synchronized void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception {
super.removeSubscription(context, sub, lastDeliveredSequenceId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
package org.apache.activemq.broker.region.virtual;

import org.apache.activemq.broker.Broker;
import org.apache.activemq.broker.region.BaseDestination;
import org.apache.activemq.broker.region.Destination;
import org.apache.activemq.broker.region.Subscription;
import org.apache.activemq.broker.region.Topic;
import org.apache.activemq.command.Message;
import org.apache.activemq.filter.BooleanExpression;
import org.apache.activemq.filter.MessageEvaluationContext;
Expand All @@ -41,8 +41,11 @@ public class SelectorAwareVirtualTopicInterceptor extends VirtualTopicIntercepto

public SelectorAwareVirtualTopicInterceptor(Destination next, VirtualTopic virtualTopic) {
super(next, virtualTopic);
BaseDestination baseDestination = getBaseDestination(next);
selectorCachePlugin = (SubQueueSelectorCacheBroker)
((Topic)next).createConnectionContext().getBroker().getAdaptor(SubQueueSelectorCacheBroker.class);
(baseDestination != null
? baseDestination.createConnectionContext().getBroker().getAdaptor(SubQueueSelectorCacheBroker.class)
: null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.activemq.broker.ConnectionContext;
import org.apache.activemq.broker.ProducerBrokerExchange;
import org.apache.activemq.broker.region.Destination;
import org.apache.activemq.broker.region.DestinationFilter;
import org.apache.activemq.broker.region.Topic;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.ActiveMQQueue;
Expand All @@ -39,7 +38,7 @@
/**
* A Destination which implements <a href="https://activemq.apache.org/virtual-destinations">Virtual Topic</a>
*/
public class VirtualTopicInterceptor extends DestinationFilter {
public class VirtualTopicInterceptor extends BaseVirtualDestinationFilter {

private final String prefix;
private final String postfix;
Expand Down
2 changes: 1 addition & 1 deletion activemq-cf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.3-TT.4-SNAPSHOT</version>
<version>6.1.5-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-cf</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.3-TT.4-SNAPSHOT</version>
<version>6.1.5-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-client</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ public void writeUTF(String text) throws IOException {
ensureEnoughBuffer((int)(pos + encodedsize + 2));
writeShort((int)encodedsize);

byte[] buffer = new byte[(int)encodedsize];
MarshallingSupport.writeUTFBytesToBuffer(text, (int) encodedsize, buf, pos);
pos += encodedsize;
}
Expand Down
Loading