diff options
author | David M. Lee <dlee@digium.com> | 2013-04-01 13:37:51 +0000 |
---|---|---|
committer | David M. Lee <dlee@digium.com> | 2013-04-01 13:37:51 +0000 |
commit | b23e8e19507af448986554d4b360ca3ceefc4c18 (patch) | |
tree | 365f657de1e64e80c2921f69d70c24414e3948e9 /include | |
parent | 2d45dbc79bf3f65a1b74edfa27f4602a4ef68dd7 (diff) |
stasis: Fixed message ordering issues when forwarding
This patch fixes an issue of message ordering that occurs when
multiple topics are forwarded to an aggregator topic (such as
ast_channel_topic_all()).
It is (very reasonably) expected that the rules governing message
dispatch order still apply, so long as the messages start from the
same thread, and are received by the same subscription. Because the
existing code had an additional layer of dispatching via the Stasis
thread pool for forwards, those promises couldn't be kept.
Forwarding subscriptions no longer have their own mailbox, and now
dispatch directly from the forwarding topic's stasis_publish()
call. This means that the topic's lock is held for the duration of not
only a message's dispatch, but the dispatch of all the forwards. This
shouldn't be a problem right now, but if an aggregator topic had many
subscribers, it could become a problem. But I figure we can write more
clever code when the time comes, if necessary.
Review: https://reviewboard.asterisk.org/r/2419/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions