[
https://issues.apache.org/jira/browse/ARTEMIS-2476?focusedWorklogId=313018&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-313018
]
ASF GitHub Bot logged work on ARTEMIS-2476:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 16/Sep/19 14:35
Start Date: 16/Sep/19 14:35
Worklog Time Spent: 10m
Work Description: clebertsuconic commented on pull request #2837:
ARTEMIS-2476: New MQTT subscriptions receive older (not last published)
retained message.
URL: https://github.com/apache/activemq-artemis/pull/2837#discussion_r324710564
##########
File path:
artemis-protocols/artemis-mqtt-protocol/src/test/java/org/apache/activemq/artemis/core/protocol/mqtt/MqttClientService.java
##########
@@ -0,0 +1,126 @@
+/*
+ * 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.protocol.mqtt;
+
+import static java.util.Objects.nonNull;
+import static
org.eclipse.paho.client.mqttv3.MqttConnectOptions.MQTT_VERSION_3_1_1;
+
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.function.Consumer;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+
+import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
+import org.eclipse.paho.client.mqttv3.MqttCallback;
+import org.eclipse.paho.client.mqttv3.MqttClient;
+import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
+import org.eclipse.paho.client.mqttv3.MqttException;
+import org.eclipse.paho.client.mqttv3.MqttMessage;
+import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
+import org.jboss.logging.Logger;
+
+import io.netty.util.concurrent.DefaultThreadFactory;
+
+public class MqttClientService implements MqttCallback {
Review comment:
Can you explain me what is this? just to make it easier for me to understand?
Is this a server with only the MQTT portion?
I can certainly hack your code and try to udnerstand.. just asking some
minimal english explanation to make my review easier.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 313018)
Time Spent: 50m (was: 40m)
> New MQTT subscriptions receive older (not last published) retained message.
> ---------------------------------------------------------------------------
>
> Key: ARTEMIS-2476
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2476
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: MQTT
> Affects Versions: 2.10.0, 2.11.0
> Reporter: Assen Sharlandjiev
> Priority: Blocker
> Time Spent: 50m
> Remaining Estimate: 0h
>
> I have observed that new MQTT subscriptions on a given topic, receive older
> retained messages. Instead of getting the latest retained message published
> on the topic, the new subscription received an older message, published
> before that last one.
>
> I have created a [mqtt-test|https://github.com/assens/mqtt-test] project that
> demonstrated the problem. Check the readme, and run the Artemis broker test:
>
> mvn -Dtest=ArtemisTest verify
>
> The test project contains multiple MQTT brokers tests. Only Artemis broker
> tests fail.
>
--
This message was sent by Atlassian Jira
(v8.3.2#803003)