paho.mqtt.java icon indicating copy to clipboard operation
paho.mqtt.java copied to clipboard

No support for ALPN

Open timmattison opened this issue 3 years ago • 5 comments

Paho doesn't currently allow the use of ALPN. This can be fixed in the SSLNetworkModule class. I will submit a PR for it.

  • [x] Bug exists Release Version 1.2.5 ( Master Branch)
  • [x] Bug exists in MQTTv3 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
  • [x] Bug exists in MQTTv5 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)

timmattison avatar Jan 20 '21 21:01 timmattison

This is necessary to connect to AWS IoT on port 443.

timmattison avatar Jan 20 '21 21:01 timmattison

On further review this appears to be quite involved to get working. The PR may take longer than expected. Has this been requested before?

timmattison avatar Jan 20 '21 22:01 timmattison

This was recently added to the Paho C library (and then the C++ and Rust libraries got it for "free"). But I haven't seen a request for the Java library yet.

fpagliughi avatar Jan 20 '21 22:01 fpagliughi

Yeah, this would be very helpful to connect to AWS IoT. Unfortunately it looks like it's beyond the level of effort I can expend for the time I was going to commit to it.

Is there any way to get this prioritized so Java has feature parity with C/C++/Rust?

timmattison avatar Jan 21 '21 16:01 timmattison

@timmattison Instead of adding ALPN support, do you think it would be appropriate to fix what caused it to break in the first place? See pull request https://github.com/eclipse/paho.mqtt.java/pull/942 I'm a newbie to paho, but something along these lines would be lower maintenance for PAHO. You are free to then add the aws alpn into the socket factory.

grandfield avatar Jun 28 '22 14:06 grandfield