Access Keys:
Skip to content (Access Key - 0)

Contents

UDP Transport

The UDP transport enables events to be sent and received as Datagram packets.

The Javadoc for this transport can be found here .

Connector

Attributes of <connector...>

Name Type Required Default Description
receiveBufferSize integer no   The size of the receiving buffer for the socket.
receiveTimeout long no   The amount of time after which a Receive call will time out.
sendBufferSize integer no   The size of the sending buffer for the socket.
sendTimeout long no   The amount of time after which a Send call will time out.
socketLinger long no   The amount of time the socket will remain open after a closesocket call.
broadcast boolean no   Whether to enable the socket to send broadcast data.
keepSendSocketOpen boolean no   Whether to keep the Sending socket open.

For example:

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:spring="http://www.springframework.org/schema/beans"
       xmlns:udp="http://www.mulesource.org/schema/mule/udp/2.2"
    xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
       http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
       http://www.mulesource.org/schema/mule/udp/2.2 http://www.mulesource.org/schema/mule/udp/2.2/mule-udp.xsd">

    <udp:connector name="udpConnector"
                   receiveBufferSize="1234"
                   receiveTimeout="2345"
                   sendBufferSize="3456"
                   sendTimeout="4567"
                   broadcast="true"
                   keepSendSocketOpen="false"
            />
...

Endpoints

You configure UDP endpoints just as you would with any other transport, with the following additional attributes:

  • host: the IP address of the server, such as www.mulesoft.com, localhost, or 127.0.0.1
  • port: the port number of the server.

For example:

<udp:inbound-endpoint host="localhost" port="61000" /> 

Message Payload

The default message payload of the UDP transport for incoming messages is a byte[] array.

Adaptavist Theme Builder Powered by Atlassian Confluence