Version 25

    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

    NameDescription
    bind_addr

    The bind address which should be used by this transport.  Supports these special values:

    • GLOBAL: Choose a public IP address, an address that is NON_LOOPBACK and not SITE_LOCAL and not LINK_LOCAL.
    • SITE_LOCAL: Choose a private IP address for which InetAddress,isSiteLocalAddress() is true (for example, 192.168.x.x or 10.x.x.x)
    • LINK_LOCAL: Choose an IP address for which InetAddress.isLinkLocalAddress() is true (for example, 169.x.x.x or 254.0.0.0).  Only useful for traffic only within one box.
    • NON_LOOPBACK: use the first address found on an interface (which is up), which is not a 127.x.x.x address
    bind_interface_strThe interface (NIC) which should be used by this transport
    bind_portThe port to which the transport binds. Default of 0 binds to any (ephemeral) port
    bundler_capacityThe max number of elements in a bundler if the bundler supports size limitations
    bundler_typeThe type of bundler used. Has to be "old" (default) or "new"
    diagnostics_addrAddress for diagnostic probing. Default is 224.0.75.75
    diagnostics_portPort for diagnostic probing. Default is 7500
    disable_loopback
    discard_incompatible_packetsDiscard packets with a different version if true. Default is false
    enable_bundlingEnable bundling of smaller messages into bigger ones. Default is true
    enable_diagnosticsSwitch to enable diagnostic probing. Default is true
    enable_unicast_bundlingEnable bundling of smaller messages into bigger ones for unicast messages. Default is false
    idGive the protocol a different ID if needed so we can have multiple instances of it in the same stack
    ip_mcastMulticast toggle. If false multiple unicast datagrams are sent instead of one multicast. Default is true
    ip_ttlThe time-to-live (TTL) for multicast datagram packets. Default is 8
    levelSets the logger level (see javadocs)
    log_discard_msgswhether or not warnings about messages from different groups are logged
    logical_addr_cache_expirationTime (in ms) after which entries in the logical address cache marked as removable are removed
    logical_addr_cache_max_sizeMax number of elements in the logical address cache before eviction starts
    loopbackMessages to self are looped back immediately if true
    marshaller_pool_size
    max_bundle_sizeMaximum number of bytes for messages to be queued until they are sent
    max_bundle_timeoutMax number of milliseconds until queued messages are sent
    mcast_group_addrThe multicast address used for sending and receiving packets. Default is 228.8.8.8
    mcast_portThe multicast port used for sending and receiving packets. Default is 7600
    mcast_recv_buf_sizeReceive buffer size of the multicast datagram socket. Default is 500'000 bytes
    mcast_send_buf_sizeSend buffer size of the multicast datagram socket. Default is 100'000 bytes
    nameGive the protocol a different name if needed so we can have multiple instances of it in the same stack
    num_timer_threadsNumber of threads to be used by the timer thread pool. Default is 4
    oob_thread_pool.keep_alive_timeTimeout in ms to remove idle threads from the OOB pool
    oob_thread_pool.max_threadsMax thread pool size for the OOB thread pool
    oob_thread_pool.min_threadsMinimum thread pool size for the OOB thread pool
    oob_thread_pool_enabledSwitch for enabling thread pool for OOB messages. Default=true
    oob_thread_pool_queue_enabledUse queue to enqueue incoming OOB messages
    oob_thread_pool_queue_max_sizeMaximum queue size for incoming OOB messages. Default is 500
    oob_thread_pool_rejection_policyThread rejection policy. Possible values are Abort, Discard, DiscardOldest and Run. Default is Discard
    port_rangeThe range of valid ports, from bind_port to end_port. Infinite if 0
    receive_interfacesComma delimited list of interfaces (IP addresses or interface names) to receive multicasts on
    receive_on_all_interfacesIf true, the transport should use all available interfaces to receive multicast messages
    singleton_nameIf assigned enable this transport to be a singleton (shared) transport
    statsDetermines whether to collect statistics (and expose them via JMX). Default is true
    thread_naming_patternThread naming pattern for threads in this channel. Default is cl
    thread_pool.keep_alive_timeTimeout in milliseconds to remove idle thread from regular pool
    thread_pool.max_threadsMaximum thread pool size for the regular thread pool
    thread_pool.min_threadsMinimum thread pool size for the regular thread pool
    thread_pool_enabledSwitch for enabling thread pool for regular messages. Default true
    thread_pool_queue_enabledUse queue to enqueue incoming regular messages. Default is true
    thread_pool_queue_max_sizeMaximum queue size for incoming OOB messages. Default is 500
    thread_pool_rejection_policyThread rejection policy. Possible values are Abort, Discard, DiscardOldest and Run. Default is Discard
    tosTraffic class for sending unicast and multicast datagrams. Default is 8
    ucast_recv_buf_sizeReceive buffer size of the unicast datagram socket. Default is 64'000 bytes
    ucast_send_buf_sizeSend buffer size of the unicast datagram socket. Default is 100'000 bytes
    use_local_hostIgnores all bind address parameters and  let's the OS return the local host address

     

     

    See also TP and Protocol Configuration Common Parameters.

     

    Back To JGroups