[rabbitmq-discuss] JavaClient HeartbeatSender
Dmitry Andrianov
dmitry.andrianov at alertme.com
Thu Feb 20 13:53:34 GMT 2014
Hi.
I'm trying to build a load-testing environment where one Java process
establishes lots of connections to RabbitMQ and then sends/receives
messages.
More of these virtual clients I can fit into single Java process - the
better.
As I am thinking of tens of thousand so obviously I want to minimise
number of threads spawned for each client.
ConnectionFactory supports that by allowing me to pass my own
ExecutorService to newConnection but as soon as connection is
established, it starts a HeartbeatSender on it.
And it looks like HeartbeatSender always creates its own
ScheduledExecutorService (as
Executors.newSingleThreadScheduledExecutor()) and there is no way to
tell it not to do so.
When I set heartbeat interval to 0 or do not call
setRequestedHeartbeat() att all, it still uses heartbeat of 600 - I
assume the value comes from the server side.
So there are two questions:
1. Is there an elegant solution for this on the client side?
2. The fact I can supply my own executor to ConnectionFactory but still
another one will be used for heartbeats - doesn't it sound like a bug? I
assume there is no issue tracker for me to use - so how do I report it?
Many thanks
This email is for the use of the intended recipient(s) only.
If you have received this email in error, please notify the sender immediately and then delete it.
If you are not the intended recipient, you must not use, disclose or distribute this email without the
author's prior permission. AlertMe.com Ltd. is not responsible for any personal views expressed
in this message or any attachments that are those of the individual sender.
AlertMe.com Ltd, 30 Station Road, Cambridge, CB1 2RE, UK.
Registered in England, Company number 578 2908, VAT registration number GB 895 9914 42.
More information about the rabbitmq-discuss
mailing list