mblauth commented on PR #4374:
URL:
https://github.com/apache/activemq-artemis/pull/4374#issuecomment-1436601028
Good question. Using netstat or procfs would be OS-specific, so that is
probably not what you have in mind. Java itself to my knowledge doesn't track
the sockets and their parameters for application use, so the only way to test
it in a portable way from the within the same JVM would be to add some sort of
tracking to the socket factories (or using some sort of bytecode manipulation)
which probably be too much hassle (and added sources for errors) for too little
value.
It should be possible to track it using the JFR Socket{Read/Write}Event if
actual data is sent, see [jdk8
SocketReadEvent.java](https://hg.openjdk.org/jdk8u/jdk8u-dev/jdk/file/7c0427079f10/src/share/classes/jdk/jfr/events/SocketReadEvent.java),
but the infrastructure for a JFR-based test is probably also too much hassle
if just added for this one topic. Additionally it would only work with OpenJDK
HotSpot-based JVMs implementing JFR (not sure if this is relevant).
If you think it might be worth going down one of these rabbit holes, let me
know, I am happy to look into it.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]