Re: Using QPID behind HTTP proxy
On 26/08/16 11:13, rat...@web.de wrote: I am using the c++ messaging API which (I think) only supports 0-9? No, the c++ messaging API supports both 0-10 and 1.0. It does not at present support websockets however. Anyhow, it would require me to manually send the AMQP commands using websockets right? I was searching for something like the QPID c++ messaging api where I could specify a HTTP proxy. In my understanding something like this does not exist right? At present I am not aware of any c++ AMQP API that speaks websockets (or tunnels over HTTP in any other way) 'out of the box'. (There are javascript libraries that can speak AMQP over websockets though). It is conceivable that the proton c++ event driven API could support websockets at some time in the future. However at present it is something you would have to implement yourself. One alternative that I imagined would be to send the request from the client via HTTP POST to a webserver (e.g. using curl with proxy setting). This webserver would then connect to the broker (in the same network) and send the answer back. I'm not too experienced with these things, but in my understanding this would be the most easy workaround to solve this problem without switching to another broker / message queue concept right? If there is anything more suitable for my usecase, please let me know... There are libraries that help proxying between websockets and tcp. E.g. https://git1-us-west.apache.org/repos/asf/qpid-proton/repo?p=qpid-proton.git;a=blob;f=examples/javascript/messenger/ws2tcp.js;h=1d90543eb9e8da353d4c8d8b8bdd1c1e8dae2a5f;hb=HEAD or pythons websockify. You can as you point out do the same for HTTP, however there is a less direct equivalence between the protocols there so you have to make some decisions about how to map between them. It should not be terribly hard though. A very trivial example of something similar: https://git1-us-west.apache.org/repos/asf/qpid-proton/repo?p=qpid-proton.git;a=blob;f=examples/python/client_http.py;h=bf65639702d24c6c6991e1c93c16210458778dbc;hb=HEAD - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
RE: Using QPID behind HTTP proxy
Thanks for the reply ;) I have read into the AMQP over WebSockets specs. However it seems that it only supports AMQP 1.0 right? I am using the c++ messaging API which (I think) only supports 0-9? Anyhow, it would require me to manually send the AMQP commands using websockets right? I was searching for something like the QPID c++ messaging api where I could specify a HTTP proxy. In my understanding something like this does not exist right? One alternative that I imagined would be to send the request from the client via HTTP POST to a webserver (e.g. using curl with proxy setting). This webserver would then connect to the broker (in the same network) and send the answer back. I'm not too experienced with these things, but in my understanding this would be the most easy workaround to solve this problem without switching to another broker / message queue concept right? If there is anything more suitable for my usecase, please let me know... Regards Tobias -- View this message in context: http://qpid.2158936.n2.nabble.com/Using-QPID-behind-HTTP-proxy-tp7649606p7649649.html Sent from the Apache Qpid users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org
RE: Using QPID behind HTTP proxy
Hi Tobias, > -Original Message- > From: rat...@web.de [mailto:rat...@web.de] > Sent: Thursday, August 25, 2016 8:30 AM > To: users@qpid.apache.org > Subject: Using QPID behind HTTP proxy > > Hello, > in my c++ application several computations are performed on a remote > server. > I have implemented this using QPID and everything works fine if a direct > internet connection is available. However, some of my clients use a HTTP > proxy to access the internet. Is there any possibility to tell QPID (in the > c++ version) to use a specific HTTP proxy? The OASIS AMQP Bindings and Mappings Technical Committee recently approved a specification for AMQP over WebSockets (http://docs.oasis-open.org/amqp-bindmap/amqp-wsb/v1.0/amqp-wsb-v1.0.html) Would that sort of mechanism suit you? The Qpid Java broker has WebSocket support, I believe. Also, you could look into Kaazing's product (https://kaazing.com/products/websocket-gateway/editions/) -Steve Huston - To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org