Apollo already has experimental UDP support [1] and this will soon become
mainstream [2].
While writing an Apollo plugin to add STOMP support to the UDP connector, we
discovered several issues that would be nice to address.
Although our goal was to restrict STOMP support to SEND frames only, we
wanted to have something as close as possible to the existing STOMP support.
In particular, we wanted to have:
1. IP based authentication via
org.apache.activemq.apollo.broker.security.SourceAddressPrincipal
2. additional STOMP headers like <stomp>'s <add_user_header>
3. routing based on the destination header
Ideally, this would appear in apollo.xml via something like:
<connector id="stomp_on_udp" bind="udp://0.0.0.0:6163" protocol="stomp">
<stomp add_timestamp_header="timestamp">
<add_user_header
kind="org.apache.activemq.apollo.broker.security.SourceAddressPrincipal">sender-ip</add_user_header>
</stomp>
</connector>
We did not find a way to add this to Apollo (via plugin) and, in our
experiments, we had to duplicate code in several occasions instead of being
able to re-use it. Maybe it would be better to have UDP being a "normal"
connector.
Similarly, it would be nice to be able to inject another protocol in Apollo
via a plugin to be able to have something like:
<connector id="syslog_to_message" bind="udp://0.0.0.0:1514" protocol="syslog">
<syslog destination="/topic/foo"/>
</connector>
FWIW, this is trivial to do in RabbitMQ [3] and I've been able to add syslog
support there in very few lines of code [4]...
Cheers,
Lionel Cons
[1]
http://mail-archives.apache.org/mod_mbox/activemq-dev/201203.mbox/%3CCAGZ-RDLF4bWhHU8c+OZZb1_AOmZ-DjfCW9U-HmDP=qv8gar...@mail.gmail.com%3E
[2] https://issues.apache.org/jira/browse/APLO-177
[3] https://github.com/tonyg/udp-exchange
[4]
https://github.com/tonyg/udp-exchange/blob/master/src/udp_exchange_syslog_packet.erl