Contents

Following topics are covered in this section:

FioranoMQ Server modules include a transport layer which interfaces with underlying network protocols and accepts incoming connections. This layer reads requests sent by applications over the network.

The responsibilities of the transport layer include:

  • Listening for incoming client connections on pre-defined protocols (HTTP/TCP).
  • Management of threads.
  • Analyzing incoming data and passing it onto core FioranoMQ services.
  • Detecting any loss of connectivity and taking remedial actions.

Socket Acceptors

Socket Acceptors represent input ports through which the server monitors incoming connections. Each socket acceptor is associated with a port number, a transport protocol, a connection manager, and an optional security parameter.

Port Number

Refers to the physical TCP/IP port through which the server monitors incoming connections. Once a connection is established, the socket acceptor handles all requests coming from the client application. This includes JMS, Admin, Lookup, and internal asynchronous requests coming from the FioranoMQ runtime library.

Icon

Since a port cannot be shared between two applications, the port number used by the FioranoMQ Server is unique to its server instance. If two instances of the FioranoMQ Server are to run simultaneously on a machine, then both servers listen on different ports. JMX Requests reach the server via the plugged-in JMX Connector, independent of the SocketAcceptor being used.

Protocol

Protocol refers to the physical transport required by a client to connect to the server. By default, the server is configured to use TCP with the option of using HTTP. SSL can also be enabled over TCP and HTTP.

Thread Management

FioranoMQ Server offers different thread management schemes that differ in their handling of new connections. The default thread management scheme associated with a socket acceptor is configured in a manner to create a new thread for each connection to the server. Other schemes allow the configuration of a fixed-size thread pool to service requests from all the connections.

Security Parameters

The socket acceptor can be configured to enable security via SSL. This can be done both on TCP as well as on HTTP protocols. FioranoMQ provides the implementation of SSL over TCP via Sun's JSSE.

Configuration

By default, the FioranoMQ Server is configured for one Socket Acceptor. This socket acceptor is configured to listen on port 1856 using the TCP protocol. The FioranoMQ Administrator has the following privileges with respect to socket acceptors:

  • Can edit the default socket acceptor configuration.
  • Can create additional socket acceptor(s).
Icon

An additional Socket Acceptor in the server which opens another port for communication over the specified protocol.


Connection Factory

As per JMS specifications, an application uses a connection factory to fetch the details of a Connection instance to connect to the server. The connection factory instance encapsulates all the parameters (like URL, protocol, and so on) required to connect to the server. These parameters are configured to use the default socket acceptor settings and must be modified if the server uses a socket acceptor with a non-default configuration. The server creates the default connection to factories when it is launched for the first time. These connection factories are automatically created based on the configuration of the socket acceptor being used.

Icon

 If multiple Socket Acceptors are used, the default connection factories use the parameters of any one Acceptor. The server can be forced to re-create default connection factories at any point. Connection Factory Configuration Parameters: 

Parameter Name

Description

 

Default Value

ConnectURL

The server URL format.
Note: The protocol to be used is not part of the URL.

 

http://localhost:1856

BackupURLs

Semi-colon separates lists of URLs that should be tried when creating connections (or when revalidating a connection) in those cases where a connection with the server specified in the connectURL cannot be established (fails).

 

 

IsForLPC

isConnectURLUpdationAllowed

If set to true, the connection factory will record the IP address and port of the server through which it is looked up. This is useful for machines where IP address or port is changed.
Note: This flag is turned ON for default factory connection.

False

 

ConnectionClientID

If not null,

represents a client ID that is automatically set on a connection created through this connection factory.

Null

 

PingDisabled

If set to true, a connection created will not be pinged even if pinging is turned ON at the server.

False

 

Obtaining a Connection Factory Instance

A connection factory is a stateless object that encapsulates information on how to connect to the server.

JNDI Lookup

A connection factory instance is a serializable object that can be stored and later looked up through any JNDI-compliant directory server. FioranoMQ provides the JNDI interface to lookup all admin objects.

Creating a new instance

An application can create a new instance of connection factory and use it after setting various configurable parameters.

 


 

Lookup

FioranoMQ applications can lookup objects (destinations and connection factories) when using the JNDI interface. A single socket acceptor can service lookup requests as well as JMS requests. Therefore, in order to send the request to the server, its connection parameters have to be specified as environment variables to JNDI. Server URL, Transport protocol, and security parameters can be specified in the environment forwarded to the JNDI layer.

Icon

 


JMX

FioranoMQ 8.0 and later versions provide extensive support for JMX. This allows any third party JMX-compliant applications to connect to the server remotely and access/modify the configuration at runtime. This requires a JMX Connector to be plugged into service incoming JMX requests. There are two options for JMX Connectors:

  1. RMI Connector
  2. JMS Connector

 RMI Connector

Is the default connector shipped with the FioranoMQServer.It uses RMI as the underlying transport protocol to establish communication with the server and with a JMX-compliant application. This connector uses a dedicated socket that accepts connections and services requests. By default, the Connector is configured for port 1858 but can be configured to work with another port.


 

JMS Connector

This connector uses JMS Bus for establishing communication with the JMX Application and with FioranoMQ Server. All connection parameters are treated as configurable parameters. The JMS connector is configured to connect to the FioranoMQ Server running with the default socket acceptor configuration. If this configuration is modified, corresponding changes must be made to the JMS Connector configuration.


 

Pinging

The transport layer detects loss of connectivity between an application and the server and performs the necessary server cleanup. Loss of connectivity is detected via a ping mechanism between the Server and the Client. By default Pinging is disabled. When enabled, it instructs the FioranoMQ client library to send ping packets periodically to the FioranoMQ Server. The server on its part monitors ping requests on all connections and if it does not receive ping packets for any connection within a configured timeout, it assumes the connection is dead and shuts it down.

Salient Features

The Configurable Parameter for Pinging includes the Ping Timeout Interval. This parameter specifies the time within which the client application is notified of a problem with connectivity. By default, this parameter is set to 4 minutes or 240,000 milliseconds. The lowest allowed value for this parameter is 30,000 milliseconds.

Pinging is automatically turned ON when the Socket Acceptor uses the HTTP protocol.

Since a connectivity problem is detected asynchronously for the application, an error is relayed through an exception set on the connection as per JMS Specifications.

Icon

In other words, it is mandate to set an exception listener on the connection if the application is to be notified of connectivity problems.

When to Enable Pinging

In some operating systems, the absence of any activity over a client socket for a period of time leads to its forceful shutdown by the OS. Enabling Pinging avoids this shutdown.

A network failure can not be detected for applications not sending requests to the server. With Pinging enabled, the application is notified of a network failure prior to the configured timeout.

How to Enable Pinging

Please refer to the Pinging section to know how to work with Pinging.

Adaptavist ThemeBuilder EngineAtlassian Confluence