Open jpVm5jYYRE1VIKL opened 5 years ago
The core of the issue should be addressed by #61
The reconnect aspect to be handled by a subsequent PR
Added some extra logs, For sub issue 2. And bit updated sub issue 1.
Can you share your amqp.conf
file? Feel free to redact out host identifiers and credentials.
Thanks for your help. I added extra config for sub issue 2.
PS: And it look like that i found one more issue with aqmp module but most probably i need to open extra issue in tracker in brief : it is about parameter "binding_key" look like it works only for commands and does not work for producers and logging . And basically usage of parameter "binding_key" require review because exist parameter with binding but not exist parameter for target queue to bind. In case of commands it is just binds to random generated queue.
I was able to recreate the reconnect issue and fixed it via #64
For the binding_key
issue, let's open a separate issue to keep the scope well defined.
Is this issue all set now?
In version FreeSWITCH Version 1.10.1-release-12-f9990221e6~64bit (-release-12-f9990221e6 64bit) issue still not solved. Freeswitch still don`t send heartbeat even if it is configured. Sub issue 2 also still not solved.
Please test with the latest master; the 1.10.1 release predates the amqp improvements:
https://github.com/signalwire/freeswitch/compare/f9990221e6...master
On Wed, 4 Dec 2019 at 03:52, jpVm5jYYRE1VIKL notifications@github.com wrote:
In version FreeSWITCH Version 1.10.1-release-12-f9990221e6~64bit (-release-12-f9990221e6 64bit) issue still not solved
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/signalwire/freeswitch/issues/59?email_source=notifications&email_token=AB2II64ENDF2HMVR3OA7WS3QW5VVZA5CNFSM4JA2ZZB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF4GWWQ#issuecomment-561539930, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2II6ZO7XRTNW5MXU24B3DQW5VVZANCNFSM4JA2ZZBQ .
-- Best Regards, Ciprian Dosoftei
The information transmitted is intended only for the addressee and may contain privileged and/or confidential material. If you are not the intended recipient, kindly contact the sender and delete the message.
Any disclosure, distribution or copying of this message is strictly prohibited without the expressed permission of the sender.
I can confirm that sub issue 2 fixed. In same time heartbeats still works only for command node and does not work for producers and logging.
up. In FreeSWITCH Version 1.10.3-release-15-129de34d84~64bit (-release-15-129de34d84 64bit) issue still not fixed. FS still dont send heart beat messages to rabbitmq
The heartbeat issue lies in the upstream, specifically the way heartbeats are implemented in the C RabbitMQ API:
[ in ] heartbeat - the number of seconds between heartbeat frame to request of the broker. A value of 0 disables heartbeats. Note rabbitmq-c only has partial support for hearts, as of v0.4.0 heartbeats are only serviced during amqp_basic_publish(), and amqp_simple_wait_frame()/amqp_simple_wait_frame_noblock()
The appearance of heartbeats functioning properly for commands but not for producers nor for logging is a direct consequence of the above, the design of the former employs amqp_simple_wait_frame_noblock
in its thread loop (indirectly, via amqp_consume_message
), whereas if the later have pending payloads to publish, no heartbeats are emitted either.
One could force out heartbeats by publishing timed dummy payloads (matching the desired heartbeat interval from the configuration) though it's not elegant solution. Advice from a core maintainer would be greatly appreciated.
Do you tell about creation of random generated queue same way as for command and bind to it and periodically publish messages to exchange and catch it in queue ?
I was thinking of using the existing routing key configuration for both components; the dummy messages would have to be clearly tagged as hearbeat/keep-alive so consuming applications won't be thrown off by them.
Any process here?
Freeswitch module amqp not send heartbeat messages to rabbitmqserver for logging and producers.
amqp.conf
And logs from rabbitmq
~~Sub issue 1: Freeswitch does not reconnect to producers in case if
<param name="heartbeat" value="0"/>
and connection to message broker temporary lost untill manual reload mod_amqp~~ Cannot recreate anymore. Did it easy before . Need some more investigations. Most probably non direct parameters sensitive Sub issue 2: Freeswitch does not reconnect to message broker if<param name="heartbeat" value="0"/>
and message broker was not available yet during freeswitch bootup. After message broker ready only commands connection alive.Update:
Log example for sub issue 2:
Configuration for sub issue 2: