eclipse-ee4j / openmq

OpenMQ
https://projects.eclipse.org/projects/ee4j.openmq/
Other
51 stars 34 forks source link

Update client addressList when a GlassFish-managed broker is added/removed to/from the cluster #91

Open glassfishrobot opened 13 years ago

glassfishrobot commented 13 years ago

This feature request describes code changes to ensure that when a broker is added to, or removed from, a conventional broker cluster being managed by GlassFish, the addressList property used by all existing and future connections to that cluster are updated to reflect the addition or removal of the broker. This means that in the event of a broker failure each connection to that broker can failover to any of the remaining brokers in the cluster, and that time is not wasted trying to failover to brokers that no longer exist.

For full and definitive detail of this feature please see the appropriate one-pager, which overrides the any detail included in this JIRA issue.

This change is needed to support the elasticity of managed MQ brokers in GlassFish 3.2.

The basic requirement here is to ensure that client connections to clustered brokers always hold an up-to-date list of the brokers in the cluster in order to ensure that in the event of connection failure the connection can failover to any of the remaining brokers in the cluster, and that time is not wasted trying to failover to brokers that no longer exist.

This requirement only applies in the following case:

In the standalone MQ client, the list of brokers in the cluster is set using the connection factory attribute imqAddressList. However where the client connection is created using the JMSRA resource adapter this property is set not by users but by JMSRA using the resource adapter property connectionURL, which may be overridden by setting the addressList property on an individual managed connection factory or activation spec.

Here is a summary of the existing behaviour in GlassFish 3.1 when using a conventional cluster:

Important: Note that if cluster elasticity is required when the brokers are remote (which is explicitly out of scope for this one-pager), GlassFish must also set or update the clusterBrokerList in this case.

Although the above behaviour will ensure that the brokers have an up to date imq.cluster.brokerlist there is currently no mechanism to ensure that existing and future connections have an up to date addressList. To achieve this the following additional behaviour is required:

Important: Note that if cluster elasticity is required when the brokers are remote (which is explicitly out of scope for this one-pager), GlassFish must also set or update the connectionURL in this case. TODO: Define private protocol by which RA sends connectionURL to broker, and broker sends imqAddressListlist to existing connections.

Affected Versions

[4.1, 4.2, 4.3, 4.4, 4.4u1, 4.4u2, 4.5, 4.5.1, 4.5.2]

glassfishrobot commented 6 years ago
glassfishrobot commented 13 years ago

@glassfishrobot Commented Reported by @nigeldeakin

glassfishrobot commented 11 years ago

@glassfishrobot Commented @nigeldeakin said: This new feature is not a requirement of GlassFish 4.0, so I'm changing the target version to 5.1.

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA MQ-91