SOA 12c – EDN – Mapping to Custom Topic with AQJMS

We have seen using Custom Topic with WeblogicJMS here and in this post we will see the same using AQJMS.

Creating a new Topic

Run the following script to create new AQ Topic.

define edn_user=dev12c_soainfra
define topic=EDN_AQJMS_CUST_TOPIC
define topic_table=EDN_AQJMS_CUST_TOPIC_TBL

 
begin
  DBMS_AQADM.stop_queue(queue_name => ‘&edn_user..&topic’);
  DBMS_AQADM.drop_queue(queue_name => ‘&edn_user..&topic’);
  DBMS_AQADM.drop_queue_table(queue_table => ‘&edn_user..&topic_table’);
end;
/
begin
  dbms_aqadm.create_queue_table(queue_table => ‘&edn_user..&topic_table’,
                                queue_payload_type => ‘SYS.AQ$_JMS_MESSAGE’,
                                multiple_consumers => true);
  dbms_aqadm.create_queue(queue_name => ‘&edn_user..&topic’,
                          queue_table => ‘&edn_user..&topic_table’,
                          max_retries => 256);
  dbms_aqadm.start_queue(queue_name        =>       ‘&edn_user..&topic’);
end;
/
commit;

Once script is run successfully, verify that AQ Topic and corresponding Queue Table is created as shown below.

aqcusttopic

You can also observe other tables created when you create a new topic.

aqtopictables

Now create a foreign destination in  foreign server EDNAQjmsForeignServer. So navigate to Services –> Messaging –> JMS Modules –> SoaJMSModule –> EDNAQjmsForeignServer –> Configuration –> Destinations in Weblogic Administration console and create as shown below:

aqcust1

Enter a meaningful name and Local JNDI for the topic. And the remote JNDI should be of the format Topics/<<AQ Topic Name>> as shown below.

aqcust2

Click OK and observe the new foreign destination created as shown below.

aqcust3

Modifying Business Event mapping

Navigate to SOA –> soa-infra –> SOA Infrastructure –> Business Events in EM and click JMS Mapping as shown below.

aqmapping

Modify JMS Topic Name to use newly created Topic and click Apply. Typically, you don’t have to create new Connection Factories. Restart the affected composites so that modified JMS mapping will be effective.

For demonstration purpose, here we are modifying the JMS Mapping for CreateOrder Business Event.

aqmodmapping

Raise CreateOrder Business Event and observe log (with OneandOnlyOne consistency level).

[2015-01-12T20:16:20.544+05:30] [soa_server1] [TRACE] [] [oracle.integration.platform.blocks.event.jms2.EdnBus12c] [tid: [ACTIVE].ExecuteThread: ’21’ for queue: ‘weblogic.kernel.Default (self-tuning)’] [userId: <anonymous>] [ecid: 5c9ca2bf-9639-4e37-a951-cb3b9fb7c06c-00000123,0:2] [APP: soa-infra] [J2EE_APP.name: soa-infra] [J2EE_MODULE.name: fabric] [WEBSERVICE.name: RaiseEvent_ep] [WEBSERVICE_PORT.name: execute_pt] [oracle.soa.tracking.FlowId: 20002] [oracle.soa.tracking.InstanceId: 20004] [oracle.soa.tracking.SCAEntityId: 29] [composite_name: EDNConsistencyCheck] [FlowId: 0000KfUb1lY3z0WjLxyGOA1Kgxik000002] [SRC_CLASS: oracle.tip.adapter.fw.log.LogManagerImpl] [SRC_METHOD: log] eis/aqjms/EDNxaDurableTopic EdnBus12c file://wsdl/eis/aqjms/EDNxaDurableTopic-OUTBOUND.wsdl [ eis/aqjms/EDNxaDurableTopic-OUTBOUND::enqueue(part,part) ] – Starting JCA LocalTransaction
[2015-01-12T20:16:20.545+05:30] [soa_server1] [TRACE] [] [oracle.integration.platform.blocks.event.jms2.EdnBus12c] [tid: [ACTIVE].ExecuteThread: ’21’ for queue: ‘weblogic.kernel.Default (self-tuning)’] [userId: <anonymous>] [ecid: 5c9ca2bf-9639-4e37-a951-cb3b9fb7c06c-00000123,0:2] [APP: soa-infra] [J2EE_APP.name: soa-infra] [J2EE_MODULE.name: fabric] [WEBSERVICE.name: RaiseEvent_ep] [WEBSERVICE_PORT.name: execute_pt] [oracle.soa.tracking.FlowId: 20002] [oracle.soa.tracking.InstanceId: 20004] [oracle.soa.tracking.SCAEntityId: 29] [composite_name: EDNConsistencyCheck] [FlowId: 0000KfUb1lY3z0WjLxyGOA1Kgxik000002] [SRC_CLASS: oracle.tip.adapter.fw.log.LogManagerImpl] [SRC_METHOD: log] eis/aqjms/EDNxaDurableTopic EdnBus12c file://wsdl/eis/aqjms/EDNxaDurableTopic-OUTBOUND.wsdl [ eis/aqjms/EDNxaDurableTopic-OUTBOUND::enqueue(part,part) ] – Invoking JCA Outbound Interaction
[2015-01-12T20:16:21.913+05:30] [soa_server1] [NOTIFICATION] [] [oracle.soa.adapter.jms.outbound] [tid: [ACTIVE].ExecuteThread: ’21’ for queue: ‘weblogic.kernel.Default (self-tuning)’] [userId: <anonymous>] [ecid: 5c9ca2bf-9639-4e37-a951-cb3b9fb7c06c-00000123,0:2] [APP: soa-infra] [J2EE_APP.name: soa-infra] [J2EE_MODULE.name: fabric] [WEBSERVICE.name: RaiseEvent_ep] [WEBSERVICE_PORT.name: execute_pt] [oracle.soa.tracking.FlowId: 20002] [oracle.soa.tracking.InstanceId: 20004] [oracle.soa.tracking.SCAEntityId: 29] [composite_name: EDNConsistencyCheck] [FlowId: 0000KfUb1lY3z0WjLxyGOA1Kgxik000002] JMSMessageProducer_produce: Successfully produced message with ID ID:11F4B4F68C6A4B93B6BAB1305CA03C72 to destination jms/fabric/EDNAQjmsCustTopic
[2015-01-12T20:16:21.913+05:30] [soa_server1] [TRACE] [] [oracle.integration.platform.blocks.event.jms2.EdnBus12c] [tid: [ACTIVE].ExecuteThread: ’21’ for queue: ‘weblogic.kernel.Default (self-tuning)’] [userId: <anonymous>] [ecid: 5c9ca2bf-9639-4e37-a951-cb3b9fb7c06c-00000123,0:2] [APP: soa-infra] [J2EE_APP.name: soa-infra] [J2EE_MODULE.name: fabric] [WEBSERVICE.name: RaiseEvent_ep] [WEBSERVICE_PORT.name: execute_pt] [oracle.soa.tracking.FlowId: 20002] [oracle.soa.tracking.InstanceId: 20004] [oracle.soa.tracking.SCAEntityId: 29] [composite_name: EDNConsistencyCheck] [FlowId: 0000KfUb1lY3z0WjLxyGOA1Kgxik000002] [SRC_CLASS: oracle.tip.adapter.fw.log.LogManagerImpl] [SRC_METHOD: log] eis/aqjms/EDNxaDurableTopic EdnBus12c file://wsdl/eis/aqjms/EDNxaDurableTopic-OUTBOUND.wsdl [ eis/aqjms/EDNxaDurableTopic-OUTBOUND::enqueue(part,part) ] – Committing JCA LocalTransaction

In above log, you can clearly observe that Business Event is published in our topic jms/fabric/EDNAQjmsCustTopic and default connection factory is used. You can refer to my previous post on how to generate this EDN log, if required.

You can also try with Guaranteed consistency level and can observe that the connection factory eis/aqjms/EDNLocalTxDurableTopic has been used along with new Topic we created.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.




Pages

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 379 other subscribers

Enter your email address to follow this blog and receive notifications of new posts by email.


%d bloggers like this: