Skip to main content
Skip table of contents

Network Swiftlet

The Network Swiftlet is the interface for SwiftMQ Swiftlets to the network. It uses non-blocking I/O and is based on Netty.

Number Selector Tasks

Specifies the number of threads responsible for processing network events. Default value is 5. You might increase it if you have a large number of simultaneous connects or a high number of high throughput connections in general.

Limiting the incoming Message Size

Since 12.5.0

To enable administrators to limit the incoming size of messages for the whole router and thus avoid OutOfMemory errors, attribute max-chunk-size can be set. The value is in bytes. Default is -1 (unlimited).

For example, to allow a maximum size of 10 MB, set it to

XML
    <swiftlet name="sys$net" max-chunk-size="10485760"/>

The connection will be closed if a client tries to send larger messages. This might turn into reconnect attempts until the client gives up:

CODE
2022-07-21 15:40:49.789/swiftlet=sys$jms, port=5001/INFORMATION/connection accepted: 127.0.0.1:54770
2022-07-21 15:40:49.843/127.0.0.1:54770/INFORMATION/Exception, EXITING: java.lang.Exception: Input message size (10485926) exceeds max-chunk-size (10485760)
2022-07-21 15:40:49.846/sys$jms/INFORMATION/JMSConnection v750/127.0.0.1:54770/connection closed
2022-07-21 15:40:49.846/sys$net/INFORMATION/127.0.0.1:54770/connection inactive, closing
2022-07-21 15:40:59.849/swiftlet=sys$jms, port=5001/INFORMATION/connection accepted: 127.0.0.1:54774
2022-07-21 15:40:59.883/127.0.0.1:54774/INFORMATION/Exception, EXITING: java.lang.Exception: Input message size (10485968) exceeds max-chunk-size (10485760)
2022-07-21 15:40:59.883/sys$jms/INFORMATION/JMSConnection v750/127.0.0.1:54774/connection closed

Detecting Zombi Connections

Zombi connections are those connections that are created but where no data is sent. Since the keepalive has not been started yet, these connections remain open.

Zombi connections can occur if, for example, SwiftMQ is monitored by opening telnet connections on a JMS listener port and also by DoS attacks.

To prevent those zombi connections brings the router down, attribute zombi-connection-timeout can be set to a millisecond value, e.g. 10000 (10 secs). The Network Swiftlet then starts a timer on each connection and disconnects the connection if the protocol has not been initiated when the timer fires.

Configuration

The configuration of the Network Swiftlet is defined within the element

XML
      <swiftlet name="sys$net" .../>

of the router's configuration file.

Attributes of Element "swiftlet"

Definition

Attribute

Type

Mandatory

Description

collect-interval

java.lang.Long

No

Throughput Collect Interval

zombi-connection-timeout

java.lang.Long

No

Zombi-Connection Timeout

dns-resolve-enabled

java.lang.Boolean

No

Resolve DNS Names during Connect

reuse-serversockets

java.lang.Boolean

No

Re-Use Server Sockets

set-socket-options

java.lang.Boolean

No

Sets TCP send/receive buffer zu router in/output buffer size

max-chunk-size

java.lang.Long

No

Maximum incoming message size (since 12.5.0)

number-selector-tasks

java.lang.Integer

No

Number of threads to process network events

Values

Attribute

Values

collect-interval

Default: 1000

zombi-connection-timeout

Default: 0

dns-resolve-enabled

Default: false

reuse-serversockets

Default: false

set-socket-options

Default: true

max-chunk-size

Default: -1

Element List "usage", Parent Element: "swiftlet"

Active Connections. This element list contains zero or more "usage" elements with this template definition:

Definition

Attribute

Type

Mandatory

Description

name

java.lang.String

Yes

Name of this Connection

swiftlet

java.lang.String

No

Attached to Swiftlet

connect-time

java.lang.String

No

Connect Time

throughput-input

java.lang.String

No

Input KB/s

throughput-output

java.lang.String

No

Output KB/s

Values

Attribute

Values

swiftlet

connect-time

throughput-input

throughput-output

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.