title: Vertx event bus access_denied
body: <p>I have an java vertx server and a JavaScript client. I want to create an event bus under twice but vertx respond : Error received on connection: access_denied</p>
  
  <p>Javascript code:</p>
  
  <pre><code>var eventBus = new vertx.EventBus("http://localhost:8989/eventbus");
  eventBus.onopen = function () {
  console.log("Event bus connected !");
  console.log(eventBus);
  
  eventBus.registerHandler("http://localhost:8989/eventbus/news-feed", function (message) {
      console.log("registred" + message.body());
  });
  </code></pre>
  
  <p>Java code:</p>
  
  <pre><code>SockJSHandler bridge = SockJSHandler.create(vertx).bridge(new BridgeOptions());
  router.route("/eventbus/*").handler(bridge);
  router.route().handler(StaticHandler.create());// otherwise serve static pages
  HttpServer httpServer = vertx.createHttpServer();
  httpServer.requestHandler(router::accept);
  httpServer.listen(Servers.SERVER_PORT);
  vertx.setPeriodic(1000, event -&gt; {
  vertx.eventBus().publish("news-feed", "{\"c\":\"df\"}");
  </code></pre>
  
  <p>Have you an idea?</p>
  
  <p>Regards</p>