Administering and configuring Event Engine and Business Events

The Event Delivery Network (EDN) in Oracle SOA Suite 12c provides a declarative way to generate and consume business events that are managed by the event engine. When a business event is published, other service components or database agents can subscribe to it. The EDN-based event engine in Oracle SOA Suite 12c is a typical publisher-subscriber model that has two different implementations:

  • AQJMS (Advanced Queuing) uses underlying database AQs as a backend store and depends on event delivery queue tables and stored procedures to manage events. The EDN AQs can be found under [PREFIX]_SOAINFRA schema with the EDN suffix.
  • WLJMS (WebLogic) implementation uses backbone JMS queues. EDN-based event messages are published to and subscribed from EDNQueue (jms/fabric/EDNQueue) or EDNTopic (jms/fabric/EDNTopic) under Services | JMS Modules | SOAJMSModule in the WebLogic Server Administration Console.

There is no definite answer to preferentially using one mode over the other. However, switching between database AQJMS and WLJMS-based EDN is quite simple. By default, Oracle SOA Suite 12c uses the WLJMS mode for EDN. This can be verified and changed by accessing the EDNConfig MBean (refer to Figure 7.41) under soa-infra | SOA Infrastructure | Administration | System MBean Properties | oracle.as.soainfra.config | Server: soa_server1 | EDNConfig. The JMSType property holds the configuration for the EDN messaging type. By default, it is set to WLJMS, meaning that the infrastructure uses Java Messaging Services for handling events. To change the messaging framework to database queues for EDN, change the property value to AQJMS and initiate a server restart for the change to take effect.

Administering and configuring Event Engine and Business Events

Figure 7.41: Viewing and modifying EDN messaging mode

Administering and testing Business Events

Oracle Enterprise Manager Fusion Middleware Control provides an ability to view, configure, test, and manage business events used by various service components across multiple composites. The EDN framework can be administered from the SOA Infrastructure | Business Events dashboard:

  • The Business Events dashboard provides the ability to search for a specific business event by specifying a full or partial event name and clicking the Search icon.
  • Click on Show Event Definition to see the schema used to build an event definition.
  • Figure 7.42 shows various events that are published and subscribed to, along with their total Subscriptions and Failed Deliveries count. The Business Events dashboard also allows testing the EDN framework as a standalone application by selecting a particular event, clicking on the Test button, and invoking the framework with a sample payload based on the event type in the pop-up window.
  • A The Event published successfully message would confirm that an event message is published to the messaging framework used by the EDN channel.

Unit testing a business event is shown in the following screenshot:

Administering and testing Business Events

Figure 7.42: Managing and unit testing Business Events

The Subscriptions tab in the dashboard is used to view service component subscriptions that are created during design time.

Note

If a SOA composite application includes a business event subscription and different revisions of the composite are deployed, event subscriptions from all revisions of the composite are active and receive messages. To receive an event with the latest revision of the composite only, it is recommended that previous revisions of the composite be retired or undeployed.

Faulted and undelivered business events can be viewed and actioned (recovery or abortion) from the Error Hospital tab in the SOA Infrastructure or the partition dashboard.

Although the EDN framework is designed to be a black box to the administrator, there are mechanisms that you can use to view event payloads for troubleshooting purposes. If the messaging mode is set to WLJMS, pause consumption from EDNQueue or EDNTopic to see what payload is being sent to the event engine. Follow these steps to pause a Java Messaging Service on the WebLogic Server:

  1. Log in to the Oracle WebLogic Server Administration Console.
  2. Click on JMS Modules under the Messaging panel.
  3. Click on SOAJMSModule.
  4. Click on EDNQueue.
  5. Click on the Control tab.
  6. Select SOAJMSModule!EDNQueue under Destinations, click on the Consumption button, and press Pause.
  7. Next time an event is published, you can view its details by going to the Monitoring tab, selecting SOAJMSModule!EDNQueue, and clicking on the Show Messages button.

When the messaging mode is configured to AQJMS, event messages are intermittently stored in the EDN_EVENT_QUEUE AQ table. To pause consumption on this AQ, connect to the [PREFIX]_SOAINFRA schema and execute the following query. The query will let the queue receive messages but will not transmit them to subscribers.

BEGIN
  SYS.DBMS_AQADM.START_QUEUE (
    QUEUE_NAME => 'DEV_SOAINFRA.EDN_EVENT_QUEUE',
    ENQUEUE    => TRUE, 
    DEQUEUE    => FALSE
  );
END;

If an event is raised now, it will be available in EDN_EVENT_QUEUE_TABLE and can be queried from the USER_DATA column using the following query. The query filters the business event payload for a particular composite instance. To access all the event messages, remove the WHERE clause from the query.

SELECT XMLTYPE.EXTRACT(XMLTYPE(T.USER_DATA.EVENT), '/EDN_BUSINESS_EVENT/PAYLOAD/*/*/*[LOCAL-NAME()="EVENTDATA"]', NULL).GETSTRINGVAL() EVENT_MESSAGE FROM DEV_SOAINFRA.EDN_EVENT_QUEUE_TABLE T WHERE XMLTYPE.EXTRACT(XMLTYPE(T.USER_DATA.EVENT), '/*/*/*/*/*[LOCAL-NAME()="COMPOSITEINSTANCEID"]/TEXT()', NULL).GETSTRINGVAL() = '990004';

Maintain extreme caution when pausing consumption on these queues for debugging purposes and ensure that consumption is resumed after the troubleshooting is complete.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.137.75