...
Maven users will need to add the following dependency to their pom.xml
for this component:
Code Block |
---|
|
<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>
|
...
The URI scheme for a DNS component is as follows
Code Block |
---|
dns://operation[?options]
|
This component only supports producers.
Options
None.
Div |
---|
class | confluenceTableSmall |
---|
|
Wiki Markup |
---|
{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 {{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 |
}} |
| | - | dig| he DNS class of the lookup. Should match the values of {{dig | The DNS class of the lookup. Should match the values of org.xbill.dns.DClass |
}} |
| | 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} | 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
Code Block |
---|
|
<route id="IPCheck">
<from uri="direct:start"/>
<to uri="dns:ip"/>
</route>
|
...
DNS lookup
Code Block |
---|
|
<route id="IPCheck">
<from uri="direct:start"/>
<to uri="dns:lookup"/>
</route>
|
...
Dig is a Unix command-line utility to run DNS queries.
Code Block |
---|
|
<route id="IPCheck">
<from uri="direct:start"/>
<to uri="dns:dig"/>
</route>
|
The query must be provided in the header with key "dns.query"
.
Include Page |
---|
| Endpoint See Also |
---|
| Endpoint See Also |
---|
|