DNS
This is an additional component for Camel to run DNS queries, using DNSJava. The component is a thin layer on top of DNSJava.
The component offers the following operations:
- ip, to resolve a domain by its ip
- lookup, to lookup information about the domain
- dig, to run DNS queries
TODO: dependency
Options
None.
Headers
Header |
Type |
Operations |
Description |
---|---|---|---|
dns.domain |
String |
ip |
The domain name. Mandatory. |
dns.name |
String |
lookup |
The name to lookup. Mandatory. |
dns.type |
String |
lookup, dig |
The type of the lookup. Should match the values of |
dns.class |
String |
lookup, dig |
he DNS class of the lookup. Should match the values of |
dns.query |
String |
dig |
The query itself. Mandatory. |
dns.server |
String |
dig |
The server in particular for the query. If none is given, the default one specified by the OS will be used. Optional. |
Examples
IP lookup
<route id="IPCheck"> <from uri="direct:start"/> <to uri="dns:ip"/> </route>
This looks up a domain's IP. For example, www.example.com resolves to 192.0.32.10.
The IP address to lookup must be provided in the header with key "dns.domain"
.
DNS lookup
<route id="IPCheck"> <from uri="direct:start"/> <to uri="dns:lookup"/> </route>
This returns a set of DNS records associated with a domain.
The name to lookup must be provided in the header with key "dns.name"
.
DNS Dig
Dig is a Unix command-line utility to run DNS queries.
<route id="IPCheck"> <from uri="direct:start"/> <to uri="dns:dig"/> </route>
The query must be provided in the header with key "dns.query"
.
See Also
XXX