DNS
Available as of Camel
...
2.7
...
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
Info | ||
---|---|---|
| ||
The DNSJava library requires running on the SUN JVM. |
Maven users will need to add the following dependency to their pom.xml
for this component:
Code Block | ||||
---|---|---|---|---|
| ||||
|http://www.xbill.org/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 Maven users will need to add the following dependency to their {{pom.xml}} for this component: {code:xml} <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-dns</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency> {code} h3. URI format The URI scheme for a DNS component is |
URI format
The URI scheme for a DNS component is as follows
Code Block |
---|
as follows {code} dns://operation {code} This component only supports producers. h3. Options None. h3. Headers {div:class=confluenceTableSmall} || Header || Type || Operations || Description || | dns.domain | String | ip | The domain name. Mandatory. | | dns.name | String | lookup | The name to lookup. Mandatory. | | dns.type | - | lookup, dig | The type of the lookup. Should match the values of {{[?options] |
This component only supports producers.
Options
None.
Headers
Div | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||
|
Examples
IP lookup
Code Block | ||||
---|---|---|---|---|
| ||||
| 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. | {div} h3. Examples h4. IP lookup {code:xml} <route id="IPCheck"> <from uri="direct:start"/> <to uri="dns:ip"/> </route> {code} |
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
Code Block | ||||
---|---|---|---|---|
| ||||
}}. h4. DNS lookup {code:xml} <route id="IPCheck"> <from uri="direct:start"/> <to uri="dns:lookup"/> </route> {code} |
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.
Code Block | ||||
---|---|---|---|---|
| ||||
{code:xml} <route id="IPCheck"> <from uri="direct:start"/> <to uri="dns:dig"/> </route> {code} |
The
...
query
...
must
...
be
...
provided
...
in
...
the
...
header
...
with
...
key
...
"dns.query"
...
.
Include Page | ||||
---|---|---|---|---|
|