RequestedHeartbeat not ablet to set from .Net #1651
Unanswered
manojnctks
asked this question in
Q&A
Replies: 2 comments
-
Please provide code that I can clone, compile and run to see EXACTLY what you are trying. I can't provide assistance otherwise. Thanks. In addition, please state why you wish to change the heartbeat timeout value. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Note that a heartbeat timeout of 10 minutes is as good as not having any. In which case you might as well disable them and use TCP keepalives if that's an option. Values between 15s and 60s are highly recommended. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using RabbitMq ver 3.13.6 with .net core7.0 (C#). I am trying to set the hearbet timeout value which is by default 60se. To set the value I have tried two ways:
var cf = new ConnectionFactory{RequestedHeartbeat =TimeSpan.FromMinutes(10);......}
var cf=new ConnectionFactory();
cf.RequestedHeartbeat = TimeSpan.FromMinutes(10);
In both scenario later on when I create
IConnection connection = cf.CreteConnection()
and try to check the of
connection.Heartbeat
I always get the default value i.e 60 sec, even though I explicitly set some other value.
I followed the .net guideline given in url https://www.rabbitmq.com/docs/heartbeats#heartbeats-timeout but not work for me, or I am missing something.
Kindly suggest how to set the value of RequestedHeartbeat as per my requirement
Note: My project is using .Net Core 7
Thanks in adavance
Beta Was this translation helpful? Give feedback.
All reactions