Trying to connect to eventbus using Java library (vertx-eventbusbridge by Saffrontech)

86 views
Skip to first unread message

Oren Shvalb

unread,
Nov 26, 2015, 8:53:39 AM11/26/15
to vert.x
Hi guys,

I'm trying to using this library, but it breaks in the connect method.

library:

Here is my code:

EventBusBridge.connect(URI.create("https://127.0.0.1:8080/sbg_eventbus"), eb -> {
   
System.out.println("Connected");
});


I get the following exception:


Nov 26, 2015 8:39:57 AM io.vertx.core.http.impl.HttpClientImpl
SEVERE
: io.netty.handler.codec.http.websocketx.WebSocketHandshakeException: Connection closed while handshake in process
AL lib
: (EE) alc_cleanup: 1 device not closed


My server side uses Vertx 3.1.0



Any idea??


Thanks!

Oren Shvalb

unread,
Nov 26, 2015, 10:15:37 AM11/26/15
to ve...@googlegroups.com
After some digging I understood that this library doesn't support SSL connections.

Need to figure out how to make it secured...any ideas?

btw: How come when using javascript eventbus and running from browser - I don't need to deal with special SSL configurations?

Thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/JohIXvWB3xY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/96333b53-af4b-4521-b0cd-1b1b9eda6516%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michel Guillet

unread,
Nov 27, 2015, 4:33:47 AM11/27/15
to ve...@googlegroups.com
Go through a local HTTPS/HTTP proxy ?

vertx-eventbusbridge <-HTTP-> nginx on localhost <-HTTPS-> vert.x

Michel
> You received this message because you are subscribed to the Google Groups "vert.x" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
> Visit this group at http://groups.google.com/group/vertx.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/CAGd9xaQkjm8pa6Q_HSQ5jMVqJ3Bn%2BW-2QXZHvPA0wHmTZvwBaw%40mail.gmail.com.

Oren Shvalb

unread,
Nov 27, 2015, 7:45:20 AM11/27/15
to ve...@googlegroups.com
I'm not familiar with Nginx, it supposed to translate the HTTP request into SSL HTTPS request? Can it be embedded into Java client application?


Michel Guillet

unread,
Nov 27, 2015, 8:52:19 AM11/27/15
to ve...@googlegroups.com
You want to proxy an HTTP request (from the Saffrontech bridge) to an HTTPS request to Vert.x. Nginx can act as a proxy like most web server. I’m sure you can fine Java equivalent (Jetty, something like that or even Vert.x  :-) ).

Honestly, I saw your PR on the bridge project: you better off waiting for this feature than doing the proxy workaround that add a lot of complexity. But if you can’t wait or help develop this feature: HTTP proxy is your only choice I think.

Michel

Oren Shvalb

unread,
Nov 27, 2015, 9:11:41 AM11/27/15
to ve...@googlegroups.com
Yeah, at this point I work with http as a workaround.

I'm developing the client in Java using libGDX. and I'm starting to get the feeling that I might try using Nashorn Java8 technoology of calling javascript libraries from within Java instead of relying on small 3rd party libraries that don't expose all the required functionality.

I also need Facebook SDK which doesn't exist for Java, so I rely on another small component which also doesn't expose all the necessary functionality.

Do you have any experience with Nashorn (Javascript Engine) ?

Cheers,
Oren

Michel Guillet

unread,
Nov 27, 2015, 9:26:42 AM11/27/15
to ve...@googlegroups.com
Do you have any experience with Nashorn (Javascript Engine) ?
Nope, I try to stay away from dynamic languages as much as I can (<- obvious trolling)

I also need Facebook SDK which doesn't exist for Java, so I rely on another small component which also doesn't expose all the necessary functionality.
In case you’ re looking for Facebook auth, I think pac4j knows how to do this.

Cheers,

Michel

Oren Shvalb

unread,
Nov 27, 2015, 9:51:57 AM11/27/15
to ve...@googlegroups.com
Yeah, pac4j looks great!

It even has vertx-pac4j :-)

Thanks!



Reply all
Reply to author
Forward
0 new messages