Is registerHandler javascript method work synchronously?

20 views
Skip to first unread message

Oren Shvalb

unread,
Jul 3, 2015, 9:37:07 AM7/3/15
to ve...@googlegroups.com
Hi,

I work with the newest Vertx 3.0

I've tried the following code (I think this is how I used to do it in v2.x):

eb.registerHandler(address, primaryGameRegistrationHandler, function() {
   eb
.send('game.host.' + primary_game_id + '.s',
       
{
               
"action" : 'join_next_tournament_round',
               
"session_id" : sessionId,
               
"game_id" : primary_game_id
       
}, function(reply) {
              console
.info(getTimeDate() + '\t Subscribe and join Primary Game address=' + address);
       
}
   
)
 
});


It doesn't work!

but if I do it separately, first the registerHandler and only then sending the message - then it works.

according to this behaviour I assume that registerHandler is sync.

Makes sense?

 
Reply all
Reply to author
Forward
0 new messages