Review Board 1.7.16


Adding AMQP backend for CDR and CEL

Review Request #4365 - Created Jan. 21, 2015 and updated

David Lee
/branches/13
Reviewers
asterisk-dev
Asterisk
This patch adds an AMQP backend for both CDR and CEL. This allows these
logs to be dispatched to a message broker, such as RabbitMQ, where they
can reliably be queued for transmission to the handling application.

The res_amqp module adds core AMQP protocol support. The provided API
only supports publishing, since that's all that's needed for CDR/CEL.
The AMQP feature of supporting multiple 'channels' per connection was
also omitted. The underlying librabbitmq library is not thread safe, so
the multiplexing benefits are limited. It also makes using the library
more complicated, since clients have to worry about both connections and
channels.

The cdr_amqp module simply registers a CDR backend which encodes CDRs as
JSON, and publishes them to an AMQP connection.

The cel_amqp module similarly registers a CEL backend, which encodes
CELs as JSON, and publishes them to an AMQP connection.
Ran amqp-consume to print messages sent to queues.

Confirmed that the amqp test command sent messages properly.

Confirmed that CDRs were properly sent.

Confirmed that CELs were properly sent.
Total:
15
Open:
2
Resolved:
12
Dropped:
1
Status:
From:
Description From Last Updated Status
I don't think this will actually ever be non-NULL. You aren't reusing state so it should get a new instance ... Joshua Colp Feb. 6, 2015, 9:39 a.m. Open
Ditto. Joshua Colp Feb. 6, 2015, 9:39 a.m. Open
Review request changed
Updated (Feb. 5, 2015, 7:13 p.m.)
Addressed review feedback.

* Used pre_apply_config
* Fixed a doc typo
Ship it!
Posted (Feb. 6, 2015, 9:39 a.m.)
Besides this minor comment this looks good to me.
/branches/13/cdr/cdr_amqp.c (Diff revision 4)
 
 
I don't think this will actually ever be non-NULL. You aren't reusing state so it should get a new instance each time.
/branches/13/cel/cel_amqp.c (Diff revision 4)
 
 
Ditto.
Posted (Feb. 8, 2015, 7:50 p.m.)
Since this is about ready to go in - for this to go into Asterisk 13, it really needs at least some basic tests for the CDR/CEL modules. I've got a branch I'm starting for that on the testsuite at http://svn.asterisk.org/svn/testsuite/asterisk/team/mjordan/rabbit-mq.

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.