On 22/07/13 12:19, qsys wrote:
> I actually have only 1 handler and I used both send and publish to test
> both methods. I started from the eventbusbridge example which didn't work.
If the example didn't work can you please file a github issue? We test
all examples before each release, so it certainly should work.
> That's when I started to test the things with the 'Sender.java'-verticle.
> Maybe this will clarify some things:
>
> 1. I tried the example and left out the handler first and added a handler
> on the server. That's what I wanted.I didn't need a handler on index.html.
> 'index.html' is still a simplified version of the example in
> eventbusbridge. It didn't work.
>
> 2. I added a handler in the 'index.html'-page (like in the example), and
> that handler did recieve the messages. But that was when both publisher and
> handler where in index.html.
>
> 3. I checked the 'examples eventbus_pointtopoint' and 'eventbus_pubsub'.
> These work when run in cluster-mode. The code of Sender.java is similar to
> the code used in the 'eventbus_pointtopoint' example. Again, it works but
> both handler and publisher are on the server-side, both running in
> cluster-mode. Any messages sent or published (!) from the client are not
> handled by the server and vice verca.
>
> The examples work, but they send or from client to client, or from server
> to server, not from client to server or vice versa. Publishing a message
> from the browser is not handled by the server and messages published on the
> server are not handled on the client. The eventbus bridge is open, as can
> be seen on the debugger of the browser and also, the 'onopen' event in the
> browser has occured - I did not mention that because I thought that was
> obvious. However, it seems to me that the client is somehow not registered
> in the cluster, so there are like two seperated event busses with the same
> name, which are not connected (yet). To reproduce my basic problem:
>
> 1. start the Server-verticle
> 2. go to
http://localhost:8080/index.html
>
> 'index.html' will send a message to the event bus after 2 seconds. There is
> a handler in the 'Server.java'-verticle, so the message should be handled
> by that verticle. It's not. Publishing instead of sending will have the
> (no-)effect.
> To test that the handler on the server works: start the 'Sender.java' (and
> 'Server.java' both in cluster mode) and the handler will handle both sent
> and published messages on the fetchdata-channel of localhost:8080/eventbus.
> To test that sending (or publishing) on the client works, add a handler in
> the javascript and see it working properly.
>
> For clarity: I use the terms server and client, but both are on the same
> machine.
>
> Thx, Kurt
>
>
> Op maandag 22 juli 2013 09:51:09 UTC+2 schreef Tim Fox het volgende: