Jerry Cwiklik created UIMA-5385:
-----------------------------------
Summary: UIMA-AS: add support for targeting specific service
instance via JMS
Key: UIMA-5385
URL: https://issues.apache.org/jira/browse/UIMA-5385
Project: UIMA
Issue Type: New Feature
Components: Async Scaleout
Reporter: Jerry Cwiklik
Fix For: 2.10.0AS
With multiple service instances getting messages from a shared JMS queue there
is no way to know which instance gets a particular message. By design, the JMS
queue provides natural load balancing and a broker routes a message to a
service which has capacity (ready thread) to process it.
Targeting services would support interesting use cases. For example, sending a
message to a specific service instance could be used to determine if the
service is viable or not. Targeted messages can also be considered of high
processing priority and processed ahead of 'normal' priority messages.
JMS supports targeting with selectors. A message listener is configured to
indicate which messages it wants to receive. The selection is based on a value
of a JMS property included in a message. The JMS selector syntax is based on
SQL 92 spec which allows for compound expressions that include: AND, OR, NOT,
etc. The message selection is done by the broker not the consumer. The broker
will route messages to a consumer whose selector matches property values in a
message.
Current UIMA-AS already supports two selectors, one for handling Process
requests and the other for GetMeta. Each of these has a dedicated listener and
thread(s) to process messages. The proposal is to add yet another listener with
a new selector to support targeting. The service selector value can be user
defined via -DHighPriorityServiceId=XXX. If the -D is not present, the UIMA-AS
will create a new listener with a selector = [Node IP: PID] which would
uniquely identify a service.
It would be up to the client application to determine value for the targeting
string (selector). The UIMA-AS client will provide a way for an application to
specify targeting string via a Map which is passed into the initialize( )
method of the UIMA-AS client. This would allow for pinning a client to a
specific service instance. All messages from the client would be processed by
that service. If targeting string is not present, targeting will not be enabled
and messages will be processed by an arbitrary service instance.
As mentioned, targeted messages will have a high priority and will be processed
first. A new java priority queue will be added to the UIMA-AS service to enable
sorting of messages according to the priority.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)