[ 
https://issues.apache.org/jira/browse/AMQNET-817?focusedWorklogId=965112&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-965112
 ]

ASF GitHub Bot logged work on AMQNET-817:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Apr/25 21:59
            Start Date: 07/Apr/25 21:59
    Worklog Time Spent: 10m 
      Work Description: Havret commented on code in PR #93:
URL: https://github.com/apache/activemq-nms-amqp/pull/93#discussion_r2032068610


##########
src/NMS.AMQP/NmsConnectionFactory.cs:
##########
@@ -367,6 +375,9 @@ private void SetUriOptions(StringDictionary options)
         {
             StringDictionary nmsOptions = 
PropertyUtil.FilterProperties(options, "nms.");
             PropertyUtil.SetProperties(this, nmsOptions);
+
+            StringDictionary amqpOptions = 
PropertyUtil.FilterProperties(options, "amqp.");

Review Comment:
   This is actually already implemented in `AmqpProviderFactory`. The only 
change needed is to add an additional property to the `AmqpProvider` class. 
That should allow the `vhost` property to be propagated appropriately.
   
   It shouldn't be configured at the connection level—it belongs on the AMQP 
provider  (at least that's how it's handled in Qpid).
   
   You can refer to this snippet for context:  
   
https://github.com/apache/qpid-jms/blob/a248f02a21e1c9ca362fe317ad581d662c71d62c/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpProvider.java#L1281-L1291
   





Issue Time Tracking
-------------------

    Worklog Id:     (was: 965112)
    Time Spent: 50m  (was: 40m)

> Add ability to configure hostname/vhost in AMQP Open frame
> ----------------------------------------------------------
>
>                 Key: AMQNET-817
>                 URL: https://issues.apache.org/jira/browse/AMQNET-817
>             Project: ActiveMQ .Net
>          Issue Type: New Feature
>          Components: AMQP
>    Affects Versions: AMQP-2.0.0
>            Reporter: Dan Langford
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> The AMQP protocol supports "virtual hosts" implemented via the Open frame, 
> the HostName field. 
> QPID Broker-J default hostname/vhost is "default". RabbitMQ default 
> hostname/vhost is "/". The current implementation reuses the URI host which 
> is quite often not correct. 
>  >           open.HostName = remoteUri.Host;
> There should be a way to set the "hostname" or "virtual host"
> In the amqpnetlite client it is set like this
> {{_connection = await Connection.Factory.CreateAsync(new Address(Address), 
> new Open() \{ HostName="default"});}}
> {{ }}
> One way to implement this could be a connection uri parameter much like QPID 
> JMS Client does with *amqp.vhost* option 
> [https://qpid.apache.org/releases/qpid-jms-2.1.0/docs/index.html]
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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