Providing JMS Adapter Access to Distributed Destinations

Oracle JCA Adapter for JMS 8-55 For inbound adapters with distributed topics, the JMS Adapter registers a notification listener with the WebLogic Server JMS on endpoint activation. The JMS Adapter creates an inbound poller thread for each available notification received from WebLogic Server JMS for a Distributed Topic member. The inbound poller thread stops working and necessary cleanup is performed if an unavailable notification is received for the member for which the poller thread was created. The durable subscription is maintained in a similar fashion as in a non-Distributed topic scenario. The Adapter unregisters the notification listener upon endpoint deactivation. Any message arriving at a Distributed Topic is processed based on the various settings used and the type of Distributed Destination in use: either one copy of a message per application, or one copy of a message per adapter endpoint. The behaviors for each of these types of Distributed Destination are provided below.

8.4.11.3 One Copy of a Message Per Application Default Behavior

The default behavior for WebLogic Server Partitioned Distributed Topics when used with the JMS Adapter is to provide one copy of a message per application. Each message needs to be processed exactly once that is, there is no duplicate processing.. In this scenario, where there is one copy of a message per application, the client id and subscription name are the same for every Distributed Destination and each adapter instance creates subscriptions on every member. The name is unique and immutable across server restarts. When using Partitioned Distributed Topics you must configure the JMS adapter to use unrestricted clientid and shared subscription policy. These two are the default settings for Distributed Destinations. When using Replicated Distributed Topics, you must configure JMS adapter to use the unrestricted clientid and shared subscription policy, which are the default settings. To achieve better performance you should use Partitioned Distributed Topics. In addition, you need to specify the following message selector, NOT JMS_WL_ DDForwarded when defining an activation spec. Refer to the following example, consisting of a snippet of a connection instance from the weblogic-ra.xml file for a local cluster: property nameFactoryPropertiesname valueClientID=SOAClient1;value property

8.4.11.4 One Copy Of a Message Per Adapter Endpoint

The second type of scenario you can employ with Distributed Topics is to have one copy of message per adapter endpoint. In this case, either the client id or the subscription name is unique for each adapter instance. The unique part of the member name is immutable across server restarts. When using Partitioned Distributed Topics you need to configure the JMS adapter to use unrestricted clientid and shared subscription policy, which are the default settings. At the same time, to achieve subscription name uniqueness, JMS adapter requires that the property TopicMessageDistributionAll default value of false is set to true. You can define this property by setting the FactoryProperties property of the 8-56 Oracle Fusion Middleware Users Guide for Technology Adapters connection instance in the weblogic-ra.xml file. An example usage a snippet of connection instance from a weblogic-ra.xml file for a local cluster is shown below; nameFactoryPropertiesname valueClientID=SOAClient2;TopicMessageDistributionAll=truevalue property In addition, you need to specify the message selector NOT JMS_WL_ DDForwarded when defining an activation spec. To achieve better performance you should use Partitioned Distributed Topics. When using Replicated Distributed Topics, you need to configure the JMS adapter to use unrestricted clientid and shared subscription policy, which are the default settings. At the same time, to achieve subscription name uniqueness, the JMS adapter requires that the property TopicMessageDistributionAll default value of false is set to true. You can define this property by setting the FactoryProperties property of the connection instance in weblogic-ra.xml. An example usage snippet of connection instance from weblogic-ra.xml for a local cluster is as shown below: nameFactoryPropertiesname value ClientID=SOAClient2;TopicMessageDistributionAll=truevalue property

8.4.11.4.1 Specifying the Message Selector when Defining an Activation Spec

You also need to specify a message selector when defining an activation spec. The message selector is required when you create one copy of message per adapter Endpoint. To specify the selector, use the Adapter Wizard when modeling a composite application that reads from Replicated Distributed Topic The metadata for the message selector you specify will be captured in the .jca file. Below is an example of a message selector defined in an activation spec.This message selector will filter out the copy of the forwarded message when sending a message to a destination subscriber. This message selector is only applicable for when using Replicated Distributed Topics. activation-spec className=oracle.tip.adapter.jms.inbound.JmsConsumeActivationSpec property name=DestinationName value=jmsDemoInTopic property name=UseMessageListener value=false property name=DurableSubscriber value=dsub1 property name=MessageSelector value=NOT JMS_WL_DDForwarded property name=PayloadType value=TextMessage activation-spec With Distributed Topics, retriable exceptions lead to message retry, while non- retriable exceptions lead to message rejection. AvailableUnavailableFailure notification does not impact the working of the outbound adapter reference. The message is produced by creating a MessageProducer for the Distributed Destination and not for a specific member. In the Distributed Topics environment, as elsewhere, an error will be processed based on the fault policies defined for the outbound reference.

8.4.11.4.2 Compatibility and Migration