Skip to content

Commit

Permalink
Support listening on open ports
Browse files Browse the repository at this point in the history
- Add a new field for the broker config to list TCP interfaces with a
  port and name
- Change how the port configuration is read to ignore the port field on
  the TCP interface when the new listeners are specified
- Add a test fixture to support configuring clusters with multiple
  TCP interfaces open
- Add an integration test to verify end-to-end connection on a cluster
  with multiple ports

Signed-off-by: Taylor Foxhall <tfoxhall@bloomberg.net>
  • Loading branch information
hallfox committed Aug 21, 2024
1 parent 7d4b3d7 commit 144b59e
Show file tree
Hide file tree
Showing 21 changed files with 3,656 additions and 2,368 deletions.
5 changes: 4 additions & 1 deletion src/groups/mqb/mqbcfg/doc/mqbcfg.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ broker, as well as the generated corresponding messages component.

/Hierarchical Synopsis
/---------------------
The 'mqbcfg' package currently has 2 components having 2 level of physical
The 'mqbcfg' package currently has 3 components having 2 levels of physical
dependency. The list below shows the hierarchical ordering of the components.
..
1. mqbcfg_messages
2. mqbcfg_brokerconfig
2. mqbcfg_tcpinterfaceconfigvalidator
..

/Component Synopsis
Expand All @@ -23,3 +24,5 @@ broker, as well as the generated corresponding messages component.
: BMQBroker generated configuration messages.
: 'mqbcfg_brokerconfig'
: Provide global access to broker configuration.
: 'mqbcfg_tcpinterfaceconfigvalidator'
: Provide validation logic for `appConfig/networkInterfaces/tcpInterface/listeners` in the broker configuration.
27 changes: 26 additions & 1 deletion src/groups/mqb/mqbcfg/mqbcfg.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<complexType name='AppConfig'>
<annotation>
<documentation>
Top level typ for the broker's configuration.
Top level type for the broker's configuration.

brokerInstanceName...: name of the broker instance
brokerVersion........: version of the broker
Expand Down Expand Up @@ -231,6 +231,10 @@
<complexType name='TcpInterfaceConfig'>
<annotation>
<documentation>
name.................:
The name of the TCP session manager.
port.................:
(Deprecated) The port to receive connections.
lowWatermark.........:
highWatermark........:
Watermarks used for channels with a client or proxy.
Expand All @@ -241,6 +245,9 @@
heartbeatIntervalMs..:
How often (in milliseconds) to check if the channel received data,
and emit heartbeat. 0 to globally disable.
listeners:
A list of listener interfaces to receive TCP connections from. When non-empty
this option overrides the listener specified by port.
</documentation>
</annotation>
<sequence>
Expand All @@ -253,6 +260,24 @@
<element name='nodeLowWatermark' type='long' default='1024'/>
<element name='nodeHighWatermark' type='long' default='2048'/>
<element name='heartbeatIntervalMs' type='int' default='3000'/>
<element name='listeners' type='tns:TcpInterfaceListener' minOccurs='0' maxOccurs='unbounded'/>
</sequence>
</complexType>

<complexType name='TcpInterfaceListener'>
<annotation>
<documentation>
This type describes the information needed for the broker to open a TCP listener.

name.................:
A name to associate this listener to.
port.................:
The port this listener will accept connections on.
</documentation>
</annotation>
<sequence>
<element name='name' type='string'/>
<element name='port' type='int'/>
</sequence>
</complexType>

Expand Down
Loading

0 comments on commit 144b59e

Please sign in to comment.