Flow of digital events with Non-Queued Delivery mode set

Disclaimer:This is specifically for those who have fair knowledge on DES.Beginners can start with http://techtv.eur.ad.sag/clipshare52/video/409/is-des-apama-round-trip-demo

Non-Queued Delivery of Digital Events

  1. What is it?
  2. Why is it required?
  3. How to configure this mode in IS and Apama?
  4. How flow of digital events handled with Non-Queued Delivery mode set?
 
1.What is it?
Non-Queued delivery mode is also called DirectDelivery mode of Digital events.This mode makes emitted digital events to reach destination without a queue in-between.If you configure a service group to have a single destination service, you can choose to bypass the local store-and-forward queue and instead use non-queued delivery.You can choose this option when you do not want events to accumulate in the store-and-forward queue.
 
You can use non-queued delivery for a service group that has a destination service of type Universal Messaging or Digital Event Persistence.

2.Why is it required?

It's counterpart 'Store&forward' mode stores emitted DES events in queue which will then forward these events to designated desination services. However, a customer J&J wanted a mechanism not to store digital events on the processing node (IS/apama), but only in their messaging systems like Broker/UM. Doing so, makes the emitted events reach the destination very fast,as queue is by-passed. This requirement led to implementation of Non-Queued delivery mode.

3.How to configure this mode in IS and Apama?

-In Command central,navigate to IS/Apama instance>Digital Event Services >Configuration > Service  Groups >Default
-Edit, select 'Use Local Store&forward Queue=No' and save.
When configuring Non-Queued mode,we cannot set multiple destination services under a service group. And also Non-Queued mode is not supported for 'In-Process' service type.

4.How flow of digital events handled with Non-Queued Delivery mode set?

Emitter behavioural pattern:

IntegrationServer: By default, IntegrationServer behaves as 'synchronous tryemit'.It means,if a DirectDelivery mode is set and a destination service is down then IntegrationServer will throw NonQueuedException.
IntegrationServer:If we set 'watt.beta.server.messaging.des.blockOnPublish=true' in IntegrationServer, then it behaves as 'synchronous emit'.It means,if a DirectDelivery mode is set and a destination service is down then IntegrationServer will block the emitter thread until desination service is available.
Apama:It behaves as 'asynchronous emit'.It means,if a DirectDelivery mode is set and a destination service is down then apama will still continue to emit the events but stores them in a apama-internal queue.
 
Scenario1:IntegrationServer(synchronous tryemit)+UM(up)+DirectDeliveryMode+emit E1 from IntegrationServer
Output:As UM destination service is up while event being emitted,emitted event E1 will reach the desination UM server.Since DirectDeliveryMode is set,E1 will reach UM fast.
 
Scenario2:IntegrationServer(synchronous tryemit)+UM(down)+DirectDeliveryMode+emit E1 from IntegrationServer
Output:As UM destination service is down while event being emitted and DirectDeliveryMode is set,NonQueuedException will be thrown.
 
Scenario3:IntegrationServer(synchronous tryemit)+UM(down)+Store&ForwardMode+emit E1+DirectDeliveryMode+emit E2 from IntegrationServer
Output:E1 will be stored in Store&Forward queue,emitting E2 will fail with nRealmUnreachableException.Only E1 will reach UM once it is back online.
 
Scenario4:IntegrationServer(synchronous emit)+UM(up)+DirectDeliveryMode+emit E1 from IntegrationServer
Output:As UM destination service is up while event being emitted,emitted event E1 will reach the desination UM server.Since DirectDeliveryMode is set,E1 will reach UM fast.
 
Scenario5:IntegrationServer(synchronous emit)+UM(down)+DirectDeliveryMode+emit E1 from IntegrationServer
Output:As UM destination service is down while event being emitted and DirectDeliveryMode is set,emitter thread in IntegrationServer will be blocked until UM becomes available.
 
Scenario6:IntegrationServer(synchronous emit)+UM(down)+Store&ForwardMode+emit E1+DirectDeliveryMode+emit E2 from IntegrationServer
Output:E1 will be stored in Store&Forward queue,emitter thread for E2 in IntegrationServer will be blocked until UM becomes available.When UM becomes online E1 will reach before E2.
 
Scenario7:Apama(synchronous emit)+UM(up)+DirectDeliveryMode+emit E1 from Apama
Output:As UM destination service is up while event being emitted,emitted event E1 will reach the desination UM server.Since DirectDeliveryMode is set,E1 will reach UM fast.
 
Scenario8:Apama(synchronous emit)+UM(down)+DirectDeliveryMode+emit E1 from Apama
Output:As UM destination service is down while event being emitted and DirectDeliveryMode is set,event E1 will be stored in apama-internal queue.
 
Scenario9:Apama(synchronous emit)+UM(down)+Store&ForwardMode+emit E1+DirectDeliveryMode+emit E2 from Apama
Output:E1 will be stored in Store&Forward queue,event E2 will be stored in apama-internal queue.When UM becomes online E1 will reach before E2.
 
Behavior will be same even for DEP services with DirectDelivery mode.