franz1981 commented on a change in pull request #3063: ARTEMIS-2692 refactor 
queue creation
URL: https://github.com/apache/activemq-artemis/pull/3063#discussion_r403915696
 
 

 ##########
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java
 ##########
 @@ -357,9 +363,29 @@ private void slowPacketHandler(final Packet packet) {
                case CREATE_QUEUE_V2: {
                   CreateQueueMessage_V2 request = (CreateQueueMessage_V2) 
packet;
                   requiresResponse = request.isRequiresResponse();
-                  session.createQueue(request.getAddress(), 
request.getQueueName(), request.getRoutingType(), request.getFilterString(), 
request.isTemporary(), request.isDurable(), request.getMaxConsumers(), 
request.isPurgeOnNoConsumers(),
-                                      request.isExclusive(), 
request.isGroupRebalance(), request.getGroupBuckets(), 
request.getGroupFirstKey(), request.isLastValue(), request.getLastValueKey(), 
request.isNonDestructive(), request.getConsumersBeforeDispatch(), 
request.getDelayBeforeDispatch(),
-                                      request.isAutoDelete(), 
request.getAutoDeleteDelay(), request.getAutoDeleteMessageCount(), 
request.isAutoCreated(), request.getRingSize());
+                  session.createQueue(new 
QueueConfiguration(request.getQueueName())
 
 Review comment:
   I would encapsulate this logic in a separate method on a separate class to 
make it more readeable an d shorter ie translation from `request` to 
`QueueConfiguration`

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


With regards,
Apache Git Services

Reply via email to