Definition
UDP uses IP multicast for sending messages to all members of a group and UDP datagrams for unicast messages (sent to a single member). When started, it opens a unicast and multicast socket: the unicast socket is used to send/receive unicast messages, whereas the multicast socket sends/receives multicast messages. The channel's address will be the address and port number of the unicast socket.
A protocol stack with UDP as transport protocol is typically used with groups whose members run on the same host or are distributed across a LAN. Before running such a stack a programmer has to ensure that IP multicast is enabled across subnets. It is often the case that IP multicast is not enabled across subnets. In such cases, the stack has to either use UDP without IP multicasting or other transports such as TCP.
Configuration Example
<UDP mcast_addr="228.8.8.8" mcast_port="45566"
ip_ttl="32"
ip_mcast="true"
mcast_send_buf_size="150000"
mcast_recv_buf_size="80000"
ucast_send_buf_size="150000"
ucast_recv_buf_size="80000"
loopback="true"
max_bundle_size="60000"
max_bundle_timeout="30"
use_incoming_packet_handler="false"
use_outgoing_packet_handler="false"
enable_bundling="false" ></UDP>
Configuration Parameters
Name | Description |
---|---|
bind_addr | The bind address which should be used by this transport. Supports these special values:
|
bind_interface_str | The interface (NIC) which should be used by this transport |
bind_port | The port to which the transport binds. Default of 0 binds to any (ephemeral) port |
bundler_capacity | The max number of elements in a bundler if the bundler supports size limitations |
bundler_type | The type of bundler used. Has to be "old" (default) or "new" |
diagnostics_addr | Address for diagnostic probing. Default is 224.0.75.75 |
diagnostics_port | Port for diagnostic probing. Default is 7500 |
disable_loopback | |
discard_incompatible_packets | Discard packets with a different version if true. Default is false |
enable_bundling | Enable bundling of smaller messages into bigger ones. Default is true |
enable_diagnostics | Switch to enable diagnostic probing. Default is true |
enable_unicast_bundling | Enable bundling of smaller messages into bigger ones for unicast messages. Default is false |
id | Give the protocol a different ID if needed so we can have multiple instances of it in the same stack |
ip_mcast | Multicast toggle. If false multiple unicast datagrams are sent instead of one multicast. Default is true |
ip_ttl | The time-to-live (TTL) for multicast datagram packets. Default is 8 |
level | Sets the logger level (see javadocs) |
log_discard_msgs | whether or not warnings about messages from different groups are logged |
logical_addr_cache_expiration | Time (in ms) after which entries in the logical address cache marked as removable are removed |
logical_addr_cache_max_size | Max number of elements in the logical address cache before eviction starts |
loopback | Messages to self are looped back immediately if true |
marshaller_pool_size | |
max_bundle_size | Maximum number of bytes for messages to be queued until they are sent |
max_bundle_timeout | Max number of milliseconds until queued messages are sent |
mcast_group_addr | The multicast address used for sending and receiving packets. Default is 228.8.8.8 |
mcast_port | The multicast port used for sending and receiving packets. Default is 7600 |
mcast_recv_buf_size | Receive buffer size of the multicast datagram socket. Default is 500'000 bytes |
mcast_send_buf_size | Send buffer size of the multicast datagram socket. Default is 100'000 bytes |
name | Give the protocol a different name if needed so we can have multiple instances of it in the same stack |
num_timer_threads | Number of threads to be used by the timer thread pool. Default is 4 |
oob_thread_pool.keep_alive_time | Timeout in ms to remove idle threads from the OOB pool |
oob_thread_pool.max_threads | Max thread pool size for the OOB thread pool |
oob_thread_pool.min_threads | Minimum thread pool size for the OOB thread pool |
oob_thread_pool_enabled | Switch for enabling thread pool for OOB messages. Default=true |
oob_thread_pool_queue_enabled | Use queue to enqueue incoming OOB messages |
oob_thread_pool_queue_max_size | Maximum queue size for incoming OOB messages. Default is 500 |
oob_thread_pool_rejection_policy | Thread rejection policy. Possible values are Abort, Discard, DiscardOldest and Run. Default is Discard |
port_range | The range of valid ports, from bind_port to end_port. Infinite if 0 |
receive_interfaces | Comma delimited list of interfaces (IP addresses or interface names) to receive multicasts on |
receive_on_all_interfaces | If true, the transport should use all available interfaces to receive multicast messages |
singleton_name | If assigned enable this transport to be a singleton (shared) transport |
stats | Determines whether to collect statistics (and expose them via JMX). Default is true |
thread_naming_pattern | Thread naming pattern for threads in this channel. Default is cl |
thread_pool.keep_alive_time | Timeout in milliseconds to remove idle thread from regular pool |
thread_pool.max_threads | Maximum thread pool size for the regular thread pool |
thread_pool.min_threads | Minimum thread pool size for the regular thread pool |
thread_pool_enabled | Switch for enabling thread pool for regular messages. Default true |
thread_pool_queue_enabled | Use queue to enqueue incoming regular messages. Default is true |
thread_pool_queue_max_size | Maximum queue size for incoming OOB messages. Default is 500 |
thread_pool_rejection_policy | Thread rejection policy. Possible values are Abort, Discard, DiscardOldest and Run. Default is Discard |
tos | Traffic class for sending unicast and multicast datagrams. Default is 8 |
ucast_recv_buf_size | Receive buffer size of the unicast datagram socket. Default is 64'000 bytes |
ucast_send_buf_size | Send buffer size of the unicast datagram socket. Default is 100'000 bytes |
use_local_host | Ignores all bind address parameters and let's the OS return the local host address |
See also TP and Protocol Configuration Common Parameters.
Comments