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

ASF GitHub Bot commented on ARTEMIS-1589:
-----------------------------------------

GitHub user jostbg opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1773

    ARTEMIS-1589 ActiveMQProtonRemotingConnection#getClientID() now returns 
remote client Id...

    ...instead of server client Id

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jostbg/activemq-artemis ARTEMIS-1589

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/1773.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1773
    
----
commit 47dd6f19c0ead5f01a526ecd941f2a32dace8f0d
Author: jostbg <35264802+jostbg@...>
Date:   2018-01-11T11:23:33Z

    ARTEMIS-1589 ActiveMQProtonRemotingConnection#getClientID() now returns 
remote client Id instead of server client Id

----


> Make RemoteContainerId accessible via ActiveMQProtonRemotingConnection
> ----------------------------------------------------------------------
>
>                 Key: ARTEMIS-1589
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1589
>             Project: ActiveMQ Artemis
>          Issue Type: New Feature
>          Components: AMQP
>    Affects Versions: 2.4.0
>            Reporter: Johan Stenberg
>            Priority: Minor
>
> To access the remote containerId in an ActiveMQServerPlugin we currently have 
> to use reflection. Something like:
> {code:java}
> public void afterCreateSession(final ServerSession session) throws 
> ActiveMQException {
>   try {
>     ActiveMQProtonRemotingConnection con = (ActiveMQProtonRemotingConnection) 
> session.getRemotingConnection();
>     Field amqpConnectionField = 
> ActiveMQProtonRemotingConnection.class.getDeclaredField("amqpConnection");
>     AMQPConnectionContext amqpConnection = amqpConnectionField.get(con);
>     String containerId = amqpConnection.getRemoteContainer();
>   } catch (final Exception ex) {
>     throw new RuntimeException(ex);
>   }
> }
> {code}
> So it would be very helpful if ActiveMQProtonRemotingConnection could be 
> extended to provider a getter for the amqpConnection field or a getter that 
> returns the remoteContainer ID via {{amqpConnection.getRemoteContainer()}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to