Publish messages using CometD Java client that can be consumed by Javascript subscribers -
i have java web application uses cometd. workflow simple: i have defined service acts upon receiving messages on channel "/service/hello". service expects parameter "name". based on creates channel named: "/"+message.getdataasmap().get("name") . channel attaches callback method send message subscribers. the javascript client (uses dojo) publishes message channel "/service/hello" , subscribes channel name has sent "/service/hello" parameter. lets take example: .... cometd.subscribe('/1234', function(message) { //do smth on message received; }); cometd.publish('/service/hello', { name: '1234' }); .... this works fine. ,what want achieve following: have javascript clients subscribers , java client publishing. have tried using examples given in cometd2 documentation java client api, doesn't work expected. seems service called messages aren't seen...