You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Christopher L. Shannon (JIRA)" <ji...@apache.org> on 2015/06/17 17:39:00 UTC

[jira] [Commented] (AMQ-5705) originBrokerURL incorrectly set in advisory messages

    [ https://issues.apache.org/jira/browse/AMQ-5705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14589934#comment-14589934 ] 

Christopher L. Shannon commented on AMQ-5705:
---------------------------------------------

[~tabish121],

I noticed this issue the other day and it's a bit odd to me that advisory messages relating to user actions (such as new connection or consumer, etc)  set the {{originBrokerURL}} property with a default URL and not the actual transport URL that was used.  For example, I ran a test and set up a broker with two transports, one nio and one tcp.  I connected using nio but the algorithm picked the tcp transport url to set as the originBrokerURL property when the new connection advisory message was fired.  It would make more sense to me to set the originBrokerUrl property as the nio URL since that was the URL used.  

This would be a pretty easy change as the ConnectionContext has a reference to the Connector used and we could get the publishable connection string from that if the connector has been set. For advisory messages that don't contain the connector (such as internal things like message expiration) a default URL can still be chosen in the same manor as it is now.

Do you have any issue with changing this behavior? The other option is to keep the originBrokerURL behavior as is and add a new property to contain the actual transport url used by the client to connect.  That would prevent issues for existing users which might be relying on the current behavior of how the originBrokerURL property is set. 


> originBrokerURL incorrectly set in advisory messages
> ----------------------------------------------------
>
>                 Key: AMQ-5705
>                 URL: https://issues.apache.org/jira/browse/AMQ-5705
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.11.1
>            Reporter: Vu Le
>            Priority: Minor
>
> With a broker configured with multiple transports, the "originBrokerURL" property of advisory messages is incorrectly set. 
> Assuming a broker that has two transports configured, an advisory message for a connection made to transport-A may have the "originBrokerURL" property set to transport-B.
> Looks like the "originBrokerURL" value is set from the getDefaultSocketURIString() method in the BrokerService class. Is there a good reason why the "originBrokerURL" value does not correlate with the transport where the advisory event is actually being triggered?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)