blob: 47872a4cd654b6b8f45d707c4e9370a46a408f38 [file] [log] [blame]
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License
////
// This assembly is included in the following assemblies:
//
// getting-started.adoc
[id='exploring-default-router-configuration-file-{context}']
= Exploring the default router configuration file
The router's configuration file (`qdrouterd.conf`) controls the way in which the router functions. The default configuration file contains the minimum number of settings required for the router to run. As you become more familiar with the router, you can add to or change these settings, or create your own configuration files.
By default, the router configuration file defines the following settings for the router:
* Operating mode
* How it listens for incoming connections
* Routing patterns for the message routing mechanism
.Procedure
. Open the following file: `{RouterConfigFile}`.
+
--
When {RouterName} is installed, `qdrouterd.conf` is installed in this directory. When the router is started, it runs with the settings defined in this file.
--
. Review the default settings in `qdrouterd.conf`.
+
--
.Default configuration file
[options="nowrap"]
----
router {
mode: standalone // <1>
id: Router.A // <2>
}
listener { // <3>
host: 0.0.0.0
port: amqp
authenticatePeer: no
}
address { // <4>
prefix: closest
distribution: closest
}
address {
prefix: multicast
distribution: multicast
}
address {
prefix: unicast
distribution: closest
}
address {
prefix: exclusive
distribution: closest
}
address {
prefix: broadcast
distribution: multicast
}
----
<1> By default, the router operates in _standalone_ mode. This means that it can only communicate with endpoints that are directly connected to it. It cannot connect to other routers, or participate in a router network.
<2> The unique identifier of the router. This ID is used as the `container-id` (container name) at the AMQP protocol level. If it is not specified, the router shall generate a random identifier at startup.
<3> The `listener` entity handles incoming connections from client endpoints. By default, the router listens on all network interfaces on the default AMQP port (5672).
<4> By default, the router is configured to use the message routing mechanism. Each `address` entity defines how messages that are received with a particular address `prefix` should be distributed. For example, all messages with addresses that start with `closest` will be distributed using the `closest` distribution pattern.
[NOTE]
====
If a client requests a message with an address that is not defined in the router's configuration file, the `balanced` distribution pattern will be used automatically.
====
--
.Additional resources
* For more information about the router configuration file (including available entities and attributes), see the {qdrouterdManPageLink}.