Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8502727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:33:57+00:00 2026-06-11T01:33:57+00:00

Environment: Mac osx lion Grails version: 2.1.0 Java: 1.7.0_08-ea If I start up vertx

  • 0
Environment: Mac osx lion
Grails version: 2.1.0
Java: 1.7.0_08-ea

If I start up vertx in embedded mode within Bootstrap.groovy and try to hit the same websocket endpoint through multiple browsers, the requests get queued up.

So depending on the timing of the requests, after one request is done with its execution the next request gets into the handler.

I’ve tried this with both websocket and SockJs and noticed the same behavior on both.

BootStrap.groovy (SockJs):

    def vertx = Vertx.newVertx()
    def server = vertx.createHttpServer()
    def sockJSServer = vertx.createSockJSServer(server)
    def config = ["prefix": "/eventbus"]

    sockJSServer.installApp(config) { sock ->
      sleep(10000)      
    }
    server.listen(8088)

javascript:

<script>

    function initializeSocket(message) {
            console.log('initializing web socket');
            var socket = new SockJS("http://localhost:8088/eventbus");
            socket.onmessage = function(event) {
                console.log("received message");
            }
            socket.onopen = function() {
                console.log("start socket");
                socket.send(message);
            }
            socket.onclose = function() {
                console.log("closing socket");
            }
    }

OR

BootStrap.groovy (Websockets):

    def vertx = Vertx.newVertx()
    def server = vertx.createHttpServer()
    server.setAcceptBacklog(10000);
    server.websocketHandler { ws ->
        println('**received websocket request')
        sleep(10000)
    }.listen(8088)

javascript

socket = new WebSocket("ws://localhost:8088/ffff");
            socket.onmessage = function(event) {
                console.log("message received");
            }
            socket.onopen = function() {
                     console.log("socket opened")
                socket.send(message);
            }
            socket.onclose = function() {
                console.log("closing socket")
            }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:33:59+00:00Added an answer on June 11, 2026 at 1:33 am

    From the helpful folks at vertx:

    def server = vertx.createHttpServer() is actually a verticle and a verticle is a single threaded process

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using zend Framework Version 1.11.11 and I work on a Mac (OSX
I am writing a program in Mac OSX 10.6 environment. In my make file,
Environment: Rails 3.2.3 Mac OS X Lion Ruby-1.9.3-p194 (MRI) I have a rails app
Environment: Mac OS X Lion, PHP 5.3.10, MySQL 5.X, TYPO3 4.7.1, Extbase 4.7.1, Fluid
On Mac OSX 5.8 I have a Java program that runs at 100% CPU
My environment: Mac OSX 10.6 Snow Leopard Ruby 1.9.2p0 Rails 3.0.0 thinking-sphinx (2.0.0.rc1) Sphinx
Environment: Main platform: MAC OSX 10.6 Secondary platform via VMWare Fusion: Windows 7 64-bit
Could you introduce me a development environment you recommend for C# on Mac?
I got an error when archiving a project. This is my environment. Mac OS
environment/cucumber.rb: ... # gem dependencies config.gem 'cucumber-rails', :lib => false, :version => '>=0.3.0' unless

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.