mattrpav commented on code in PR #2122:
URL: https://github.com/apache/activemq/pull/2122#discussion_r3421509223


##########
activemq-broker/src/main/java/org/apache/activemq/broker/region/DestinationFactoryImpl.java:
##########
@@ -88,8 +91,11 @@ public Destination createDestination(ConnectionContext 
context, ActiveMQDestinat
                 return queue;
             }
         } else if (destination.isTemporary()) {
-            
-            Topic topic = new Topic(brokerService, destination, null, 
destinationStatistics, taskRunnerFactory);
+            final ActiveMQTempDestination tempDest = 
(ActiveMQTempDestination)destination;
+            if (tempDest.getConnectionId() == null) {
+                throw new IllegalArgumentException("Temporary topic must have 
a connectionId");
+            }
+            Topic topic = new TempTopic(brokerService, destination, null, 
destinationStatistics, taskRunnerFactory);

Review Comment:
   Good fix! A proper TempTopic v Topic here.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to