You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "Havret (via GitHub)" <gi...@apache.org> on 2026/06/02 22:49:47 UTC

[PR] Move AMQP transport settings from NmsConnectionInfo to AmqpProvider [activemq-nms-amqp]

Havret opened a new pull request, #112:
URL: https://github.com/apache/activemq-nms-amqp/pull/112

   It's a follow up for #102. 


-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [PR] Move AMQP transport settings from NmsConnectionInfo to AmqpProvider [activemq-nms-amqp]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #112:
URL: https://github.com/apache/activemq-nms-amqp/pull/112#discussion_r3344935721


##########
src/NMS.AMQP/Provider/Amqp/AmqpConnection.cs:
##########
@@ -112,12 +112,12 @@ private void OnClosed(IAmqpObject sender, Error error)
         internal void OnLocalOpen(Open open)
         {
             open.ContainerId = Info.ClientId;
-            open.ChannelMax = Info.ChannelMax;
-            open.MaxFrameSize = (uint) Info.MaxFrameSize;
+            open.ChannelMax = Provider.ChannelMax;
+            open.MaxFrameSize = (uint) Provider.MaxFrameSize;
             open.HostName = String.IsNullOrWhiteSpace(this.Provider.VHost) ? remoteUri.Host : this.Provider.VHost;

Review Comment:
   `Provider.MaxFrameSize` is an `int` coming from URI options and can be set to a negative value; casting a negative `int` to `uint` will produce a huge frame size and can break protocol negotiation. Guard against non-positive values before assigning `Open.MaxFrameSize`.



##########
src/NMS.AMQP/Meta/NmsConnectionInfo.cs:
##########
@@ -69,9 +58,6 @@ public NmsConnectionInfo(NmsConnectionId connectionId)
         public bool LocalMessageExpiry { get; set; }
         public string QueuePrefix { get; set; }
         public string TopicPrefix { get; set; }
-        public ushort ChannelMax { get; set; } = DEFAULT_CHANNEL_MAX;
-        public int MaxFrameSize { get; set; } = DEFAULT_MAX_FRAME_SIZE;
-        public int IdleTimeOut { get; set; } = DEFAULT_IDLE_TIMEOUT;
         
         public bool AnonymousRelaySupported { get; set; }

Review Comment:
   `NmsConnectionInfo` is a public type; removing `ChannelMax`, `MaxFrameSize`, and `IdleTimeOut` is a source/binary breaking change for any consumers that used these properties. Consider reintroducing them as `[Obsolete]` shims (even if the provider now owns the values) to preserve compatibility for the 2.x line.



-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact