FAQ
The method (getRemoteAddress()) in class
"org.apache.activemq.transport.ws.AbstractStompSocket" does not return the
correct address; it returns always ""StompSocket_" + hashCode();"

We need the correct address (e.g. "wss://127.0.0.1:63114") for our use case.

The implementation whould be very simple.
In class "org.apache.activemq.transport.ws.jetty8.WSServlet" (and also in
jetty9 package) pass the address during creation of class StompSocket in the
same package:

/WebSocket socket = new CustomStompSocket("wss://" + request.getRemoteAddr()
+ ":" + request.getRemotePort());/

Can this be implemented in activeMQ 5.12?


Thanks Christian



--
View this message in context: http://activemq.2283324.n4.nabble.com/Enable-getRemoteAddress-method-in-WebSocket-Requests-tp4698179.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Search Discussions

  • Christopher Shannon at Jun 25, 2015 at 6:53 pm
    Hi Christian,

    I can take care of this. Can you create a new Jira for this issue? This
    looks like it needs to be addressed for MQTT over websockets as well.

    -Chris
    On Thu, Jun 25, 2015 at 11:15 AM, xgadkem wrote:

    The method (getRemoteAddress()) in class
    "org.apache.activemq.transport.ws.AbstractStompSocket" does not return the
    correct address; it returns always ""StompSocket_" + hashCode();"

    We need the correct address (e.g. "wss://127.0.0.1:63114") for our use
    case.

    The implementation whould be very simple.
    In class "org.apache.activemq.transport.ws.jetty8.WSServlet" (and also in
    jetty9 package) pass the address during creation of class StompSocket in
    the
    same package:

    /WebSocket socket = new CustomStompSocket("wss://" +
    request.getRemoteAddr()
    + ":" + request.getRemotePort());/

    Can this be implemented in activeMQ 5.12?


    Thanks Christian



    --
    View this message in context:
    http://activemq.2283324.n4.nabble.com/Enable-getRemoteAddress-method-in-WebSocket-Requests-tp4698179.html
    Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
  • Xgadkem at Jun 26, 2015 at 5:16 am
    Hi Chris,

    thanks.
    MQTT should also be fixed. I've created the Jira issue AMQ-5865
    <https://issues.apache.org/jira/browse/AMQ-5865> for this problem.

    Thanks Christian



    --
    View this message in context: http://activemq.2283324.n4.nabble.com/Enable-getRemoteAddress-method-in-WebSocket-Requests-tp4698179p4698199.html
    Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
  • Christopher Shannon at Jun 26, 2015 at 6:48 pm
    I'll submit a pull request for this on Monday, seems pretty straight
    forward.
    On Fri, Jun 26, 2015 at 12:53 AM, xgadkem wrote:

    Hi Chris,

    thanks.
    MQTT should also be fixed. I've created the Jira issue AMQ-5865
    <https://issues.apache.org/jira/browse/AMQ-5865> for this problem.

    Thanks Christian



    --
    View this message in context:
    http://activemq.2283324.n4.nabble.com/Enable-getRemoteAddress-method-in-WebSocket-Requests-tp4698179p4698199.html
    Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriesactivemq
postedJun 25, '15 at 4:49p
activeJun 26, '15 at 6:48p
posts4
users2
websiteactivemq.apache.org

2 users in discussion

Christopher Shannon: 2 posts Xgadkem: 2 posts

People

Translate

site design / logo © 2018 Grokbase