Ahh, i missed that. In your OP you mention you want to connect Camel to ActiveMQ which is behind a firewall. For that the http transport should work fine.
If you're sending messages from a browser directly to the broker, STOMP over WebSockets should be work. If you're getting a BindAddressException on the broker start up, check to see what's already listening to those ports that you've specified (transports, jmx, etc). On Mon, Oct 14, 2013 at 6:53 PM, ako <and...@koelewijn.net> wrote: > Because i want to deliver messages to the queue from a webbrowser. The > broker will be behind a firewall, only able to use ports 80 and 443. > The camel route should also connect to the same broker over the same port > to consume messages from the same queue. > > > > > > +-------------+ +--------------+ +----------------+ > | | | | | | > | | | | | | > | |Stomp+ws | |Stomp+ws | | > | Browser +-------->| Firewall +--------->|- Broker | > | | | | | | > | | | |<---------+ | > | | | | | | > +-------------+ +----- -+------+ +----------------+ > | > |Stomp+ws > | > v > +--------------+ > | | > | | > | Camel | > | | > +--------------+ > > > On Tue, Oct 15, 2013 at 1:40 AM, ceposta [via Camel] < > ml-node+s465427n5741568...@n5.nabble.com> wrote: > > > Why don't you use the http transport? Don't need WS for this... > > > > http://activemq.apache.org/http-and-https-transports-reference.html > > > > > > > > On Sun, Oct 13, 2013 at 7:52 AM, ako <[hidden email]< > http://user/SendEmail.jtp?type=node&node=5741568&i=0>> > > wrote: > > > > > Hi, > > > > > > I want to create a camel route which consumes messages from an ActiveMQ > > > topic. There's a firewall between the camel code and the ActiveMQ > > broker, > > > the broker can only expose ports 80 and 443. Is it possible to create a > > > camel route which receives messages from the broker using stomp over > > > websockets? > > > > > > The broker has a websocket connector: > > > > > > BrokerService brokerSvc = new BrokerService(); > > > brokerSvc.setBrokerName("brkr1"); > > > brokerSvc.addConnector("ws://localhost:80?trace=true"); > > > brokerSvc.setPersistent(false); > > > brokerSvc.start(); > > > > > > For the camel route i have the following code: > > > > > > StompComponent stompComponent = new StompComponent(); > > > stompComponent.setBrokerURL("ws://localhost:80"); > > > camelContext.addComponent("stomp",stompComponent); > > > > > > from("stomp:topic:test"). > > > log(LoggingLevel.INFO, "received websocket msg > > > ${id}, ${body}"). > > > setBody(simple("${body.ascii.toString()}")). > > > to("file:///c:/tmp/to-stomp"); > > > > > > When i run this i get the following error: > > > ... > > > Caused by: java.lang.Exception: Unsupported URI scheme 'ws' > > > at > > > org.fusesource.stomp.client.Stomp.connectCallback(Stomp.java:119) > > > at > > > > > > > > > org.apache.camel.component.stomp.StompEndpoint.doStart(StompEndpoint.java:73) > > > > > at > > > org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) > > > ... > > > > > > Using ActiveMQ 5.8.0 and Camel 2.12.1. > > > > > > Is this possible at all? > > > > > > Thanks, > > > Andrej > > > > > > > > > > > > > > > -- > > > View this message in context: > > > > > > http://camel.465427.n5.nabble.com/Camel-consuming-from-apache-mq-using-stomp-over-websockets-tp5741476.html > > > Sent from the Camel - Users mailing list archive at Nabble.com. > > > > > > > > > > > -- > > *Christian Posta* > > http://www.christianposta.com/blog > > twitter: @christianposta > > http://www.christianposta.com/blog > > > > > > ------------------------------ > > If you reply to this email, your message will be added to the discussion > > below: > > > > > http://camel.465427.n5.nabble.com/Camel-consuming-from-apache-mq-using-stomp-over-websockets-tp5741476p5741568.html > > To unsubscribe from Camel consuming from apache mq using stomp over > > websockets, click here< > http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5741476&code=YW5kcmVqQGtvZWxld2lqbi5uZXR8NTc0MTQ3NnwxMjcxNTM4ODEz > > > > . > > NAML< > http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml > > > > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-consuming-from-apache-mq-using-stomp-over-websockets-tp5741476p5741569.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta