Hello,<br><br>I just wanted to contribute some code I recently changes if anyone needs it. We have a use-case where I'm using STOMP with RabbitMQ's STOMP adapter and Orbited to push updates to a browser, or maybe even allow clients to connect to the STOMP server, not sure yet. Anyway, we need to ensure that only certain users get pushed certain content, hence authentication.<br>
<br>The way I have this working is: client connects to STOMP with generic just-TLD cookie (so it can be passed also to STOMP server which would run on another subdomain) and Orbited's io.js can read the cookie and send it up to the STOMP adapter as a 'cookie' header. It (the JS) also generates a random ID for the queue-name for that connection. This is all assuming I have 1 queue per connection as per the broadcast-style suggestion for STOMP adapter.<br>
<br>So now the STOMP adapter reads that cookie header and hits a page using http:request (via inets) with that cookie and passes in the queue name too. The web-app will recognize the cookie as belonging to a user and read the queue name. It (the web-app) will then set the appropriate bindings for that user. Since this is a topic exchange, the bindings would be for the topics updates the user will receive on her browser. If there is no cookie or the cookie is invalid, the web-app can take care of all that and just assign some default bindings for guests.<br>
<br>This is all working pretty well, except that I have to start 'inets:start()' manually in the erl command prompt. I was wondering how could I get this to be done on startup when the STOMP adapter starts?<br><br>
I've attached the code and a diff (based on the tip of STOMP adapter from hg). Right now the URL is hardcoded but I plan to make that more configurable later.<br><br>Anyway, I hope maybe it can be of some use to someone who might need similar functionality.<br>
<br>-Nemanja<br>