Query wikipedia over DNS TXT queries with Apache Camel

13 February 2011

Coming from the excellent One thing well blog, a commandlinefu trick to get Wikipedia to spit definitions:

Query Wikipedia by issuing a DNS query for a TXT record. The TXT record will also include a short URL to the complete corresponding Wikipedia entry.You can also write a little shell script like:
dig +short txt ${1}.wp.dg.cx

I’d like to take it a notch further and see if that would be possible to do with Apache Camel.

Camel doesn’t have support for DNS by default. But it seems pretty easy to port and integrate DNSJava with it for example.

I’m starting a little experiment here, I’ll let you know how that works out.