[mod_amqp] Add XML handler via AMQP with RPC reply pattern#3022
Open
alexey-khabulyak wants to merge 1 commit into
Open
[mod_amqp] Add XML handler via AMQP with RPC reply pattern#3022alexey-khabulyak wants to merge 1 commit into
alexey-khabulyak wants to merge 1 commit into
Conversation
- Dedicated reader thread with broker-assigned exclusive queue - Sender thread publishes requests with reply_to/correlation_id - APR queue per request for response dispatch - Configurable fetch timeout (fetch_timeout_ms, default 5000ms) - Removes mod_amqp_aux_connection_t in favour of mod_amqp_connection_t
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds an XML handler for
mod_amqpthat allows FreeSWITCH to fetch XML configuration (directory, dialplan, etc.) from a remote backend over AMQP using the standard RPCreply_to/correlation_idpattern.Architecture:
amq.gen-...), and consumes repliesreply_toto the reader's queue name and a UUID ascorrelation_idxml_amqp_fetchcall creates a per-request APR queue (capacity 1), registers it in a hash bycorrelation_id, then blocks until the reader thread dispatches the response or the fetch timeout expiresrouting_key = reply_to— no custom reply exchange neededRemoves
mod_amqp_aux_connection_tentirely; the reader connection now reuses the existingmod_amqp_connection_tstruct.Type of Change
Related Issues
Testing
test_xml_handler.py) against a live RabbitMQ 4.x broker;user_dataFreeSWITCH command returns correct values from the remote XML responseChecklist
Additional Notes
The fetch timeout (
fetch_timeout_ms, default 5000ms) and circuit breaker (circuit_breaker_ms, default 10000ms) are configurable viaamqp.conf.xml. See updatedconf/vanilla/autoload_configs/amqp.conf.xmlfor reference configuration.