Child pages
  • DNS
Skip to end of metadata
Go to start of metadata


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

Requires SUN JVM

The DNSJava library requires running on the SUN JVM.
If you use Apache ServiceMix or Apache Karaf, you'll need to adjust the etc/ file, to add to the list of Java platform packages exported. The server will need restarting before this change takes effect.

Maven users will need to add the following dependency to their pom.xml for this component:

    <!-- use the same version as your Camel core version -->

URI format

The URI scheme for a DNS component is as follows


This component only supports producers.





IP lookup

        <route id="IPCheck">
            <from uri="direct:start"/>
            <to uri="dns:ip"/>

This looks up a domain's IP. For example, resolves to
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"/>

This returns a set of DNS records associated with a domain.
The name to lookup must be provided in the header with key "".


Dig is a Unix command-line utility to run DNS queries.

        <route id="IPCheck">
            <from uri="direct:start"/>
            <to uri="dns:dig"/>

The query must be provided in the header with key "dns.query".

  • No labels