dynamic service chains
Hi,
[new to jcaps]
I have a sequence of services, say serviceA -> serviceB -> serviceC. I wish to add another service to that sequence, but I want to dynamically determine which JCD is called as ServiceD. The interface contract for all potential serviceD's is the same, so serviceC always passes the same thing.
Is this possible in some fashion in jcaps? connectivity map? einsight? java?
regards,
dk-
# 3
My guess is that your JCD service C is going to send a JMS message to a topic to which your JCD service D candidates might subscribe. If so, perhaps you could use a JMS message selector for each JCD service D link in your connectivity map(s). Open the JMS connector properties and set the Configuration->JMS Client->Basic->Message Selector to identify the selection condition that would allow the JMS IQ Manager to dynamically determine, based on message content, which service(s) would receive this message.
Regards.
# 5
These are all good suggestions. What I'm trying to avoid is configuring/coding any branching code.
For example, I'm not keen on creating a connectivity map for every dynamically invokable jcd I create. I just want to be able to call it synchronously and be done with it. Any other suggestions?
dk-
# 6
You can "expose" a JCD via a request/reply JMS Queue. It could be a queue that is shared amongst multiple JCDs using selectors, as has been suggested. The JCD can be clever enough to figure out whether it is to send the response to a JMSReplyTo queue (which will make the response destination settable by the requestor and dynamic) or just send it (which will make the response destinaiton static, configured through the CM). The requestor JCD could use a requestReply() method specifyng an explicit destination and/or with agreed upon JMS Header field, for example JMSCorrelationID, configured, to cause the message to go to the right queue or to trigger the right jcd via a selector. If the requestor JCD derived the valur for the selector or the queue name from the message the whole arrangement would be dynamic and dependent on message content. Does this go somewhere towards satisfying the requirement?
# 7
Hi DK,
If I understand correctly, you want to create a JCD and no connectivity map for it. This JCD will be invoked dynamically by some other JCD based on some rules.
But the potential question which arises in this scenario is that where is this dynamic JCD will be deployed? If you don't have a Connectivity Map and associated Deployment Profile, then that JCD will not be deployed in server, and hence not usable.
So, essentially, you need to create the JCD, connectivity map and deployment profile for all JCD irrespective of whether it is a pre-defined flow, or it is invoked dynamically.
As suggested, you can use message selectors on the queue, or another intrim JCD which will do dynamic routing to various JCDs.
Hope this satisfies your query.