ServerReceiver

ServerReceiver is a JMS message producer that listens to a ServerSocket and accepts socket connections from it. Once there is a new connection, it checks out a thread to handle the message I/O on the socket. The thread reads the byte stream, adds them into messages and puts the messages to the output XQueue. ServerReceiver supports flow control and allows object control from its owner. It is fault tolerant with retry and idle options. The max number of client connections is determined by both Capacity and Partition of the XQueue. Backlog is the queue length of the server socket listener.

ServerReceiver supports the operations of respond and acquire. For the operation of respond, ServerReceiver is paired with the client in operation of request. In this case, ServerReceiver receives the message as the request. Then it fulfills the request and sends the response back. For the operation of acquire, ServerReceiver is reading the bytes and adds the content to the outgoing messages.

Apart from the common properties, there are many implementation specific properties for ServerReceiver.
Property Name Data Type Requirement Description Examples
Backlog integer optional length of the backlog queue 16 (default: 1)
KeepAlive string of true or false optional keepAlive of the server socket true (default: false)

Here is an example of ServerReceiver:

{
  "Name": "rcvr_admin",
  "ClassName": "org.qbroker.receiver.ServerReceiver",
  "URI": "tcp://localhost:6627",
  "LinkName": "escalation",
  "Operation": "respond",
  "Capacity": "64",
  "Partition": "0,32",
  "Mode": "daemon",
  "XAMode": "1",
  "TextMode": "1",
  "EOTBytes": "0x0a",
  "DisplayMask": "0",
  "Template": "##body##\n",
  "Parser": {
    "ClassName": "org.qbroker.event.EventParser"
  }
}
where it accepts the TCP connections at the port of 6627. The request will ended with the newline. The response will be parsed by the EventParser.