https://gist.github.com/anonymous/bac4b7f5249e9b161b6f
2014-01-03 11:54:42,093 [vert.x-eventloop-thread-11] INFO - Message number 1800000 and plus
2014-01-03 11:54:42,539 [vert.x-eventloop-thread-11] INFO - Message number 1900000 and plus
2014-01-03 11:54:42,982 [vert.x-eventloop-thread-11] INFO - Message number 2000000 and plus
2014-01-03 11:54:42,982 [vert.x-worker-thread-3] INFO - Messenger end send: 00-00-020(20950)
2014-01-03 11:55:11,166 [vert.x-worker-thread-1] WARN - No pong from server 192.168.1.33:61176 - will consider it dead, timerID: 199 holder org.vertx.java.core.eventbus.impl.DefaultEventBus$ConnectionHolder@b3c80aa
for (int i = count; i < count + step; i++) {final JsonObject jsonMessage = new JsonObject();jsonMessage.putString("token", TOKEN_ROOT + i);vertx.eventBus().send("com.eogile.akka.core.Notifier.stat.plus", jsonMessage);}
Hi,
I�m a new user of vertx, actually testing a way to send lots of messages in the event bus.
My test application has 2 modules :
I read lots of google groups messages such as
- One of them is an http server: it gets an URL like http://IP:PORT/message/test/[numberOfMessages]/[numberOfMessageByPaquet] and dispatch a JSON message within a loop.
- The other one listens to the event bus and counts the number of messages received with a static attribute.
and followed the different advice, but when I put more than 2 million messages in my program, an exception appears :
No pong from server IP:60074 - will consider it dead, timerID: 391 holder org.vertx.java.core.eventbus.impl.DefaultEventBus$ConnectionHolder@fd660b5
I actually have 2 clusters on 2 computers and run my application with -> vertx runzip messenger-0.0.1-SNAPSHOT-mod.zip -ha (-cluster does the same thing).
I suppose my code blocks the event loop but I don�t know how to do it any differently.
My source code is available at:
Here is the end of my logging file on my node 1:
�2014-01-03 11:54:42,093 [vert.x-eventloop-thread-11] INFO � - Message number 1800000 and plus
2014-01-03 11:54:42,539 [vert.x-eventloop-thread-11] INFO � - Message number 1900000 and plus
2014-01-03 11:54:42,982 [vert.x-eventloop-thread-11] INFO � - Message number 2000000 and plus
2014-01-03 11:54:42,982 [vert.x-worker-thread-3] INFO � - Messenger end send: 00-00-020(20950)
2014-01-03 11:55:11,166 [vert.x-worker-thread-1] WARN � - No pong from server 192.168.1.33:61176 - will consider it dead, timerID: 199 holder org.vertx.java.core.eventbus.impl.DefaultEventBus$ConnectionHolder@b3c80aa
Does anybody have an idea on that subject ?
Thank you.
Best regards,
Julien
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You are blocking the event loop and I don't think you'd ever want to do something like that in practice (you'd rather make 1 message and include all the data inside it?)
However if you do want to get something like this and not block the runloop, you would change this part here
for (int i = count; i < count + step; i++) {final JsonObject jsonMessage = new JsonObject();jsonMessage.putString("token", TOKEN_ROOT + i);vertx.eventBus().send("com.eogile.akka.core.Notifier.stat.plus", jsonMessage);}
to something like this
private int mCount, mStep;
sendNext(final int step) {
JsonObject jsonMessage = new JsonObject();
jsonMessage.putString("token", "TOKEN_ROOT" + mCount);
vertx.eventBus().send("..", jsonMessage, new Handler<Message>() {
��� ��� ��� @Override
��� ��� ��� public void handle(Message event) {
��������������� if (step+1 < count)
��� ��� ��� ������ sendNext(step+1);
��� ��� ��� }
��� ��� };
}
On Friday, January 3, 2014 3:28:38 PM UTC+2, Julien P wrote:
Hi,
I�m a new user of vertx, actually testing a way to send lots of messages in the event bus.
My test application has 2 modules :
I read lots of google groups messages such as
- One of them is an http server: it gets an URL like http://IP:PORT/message/test/[numberOfMessages]/[numberOfMessageByPaquet] and dispatch a JSON message within a loop.
- The other one listens to the event bus and counts the number of messages received with a static attribute.
and followed the different advice, but when I put more than 2 million messages in my program, an exception appears :
No pong from server IP:60074 - will consider it dead, timerID: 391 holder org.vertx.java.core.eventbus.impl.DefaultEventBus$ConnectionHolder@fd660b5
I actually have 2 clusters on 2 computers and run my application with -> vertx runzip messenger-0.0.1-SNAPSHOT-mod.zip -ha (-cluster does the same thing).
I suppose my code blocks the event loop but I don�t know how to do it any differently.
My source code is available at:
Here is the end of my logging file on my node 1:
�2014-01-03 11:54:42,093 [vert.x-eventloop-thread-11] INFO � - Message number 1800000 and plus
2014-01-03 11:54:42,539 [vert.x-eventloop-thread-11] INFO � - Message number 1900000 and plus
2014-01-03 11:54:42,982 [vert.x-eventloop-thread-11] INFO � - Message number 2000000 and plus
2014-01-03 11:54:42,982 [vert.x-worker-thread-3] INFO � - Messenger end send: 00-00-020(20950)
2014-01-03 11:55:11,166 [vert.x-worker-thread-1] WARN � - No pong from server 192.168.1.33:61176 - will consider it dead, timerID: 199 holder org.vertx.java.core.eventbus.impl.DefaultEventBus$ConnectionHolder@b3c80aa
Does anybody have an idea on that subject ?
Thank you.
Best regards,
Julien
--
For more options, visit https://groups.google.com/d/optout.
I have just realized that when you say flow control you mean some kind of (over)load control/protection. And I thought that it was about message/work flow control.
--
new PingMessage(serverID).write(holder.socket);
// Got a pong backvertx.cancelTimer(timeoutID);--
Hi,
I’m a new user of vertx, actually testing a way to send lots of messages in the event bus.
My test application has 2 modules :
- One of them is an http server: it gets an URL like http://IP:PORT/message/test/[numberOfMessages]/[numberOfMessageByPaquet] and dispatch a JSON message within a loop.
- The other one listens to the event bus and counts the number of messages received with a static attribute.
I read lots of google groups messages such as
and followed the different advice, but when I put more than 2 million messages in my program, an exception appears :
No pong from server IP:60074 - will consider it dead, timerID: 391 holder org.vertx.java.core.eventbus.impl.DefaultEventBus$ConnectionHolder@fd660b5
I rephrase my question since there was no answer till now.
Is it possible that a "ping sending", "pong receiving" or "ping timeout canceling" code is starving and it causes the problem?
--