Contents

A durable route creates a durable subscriber to the source topic thereby eliminating chances of message loss when messages flow through the route. The overview provided below gives an idea of durable subscription and its importance. Subsequent sections further explain how to configure and manage a durable subscription. 

To receive messages from a Topic, a subscriber creates a connection. This connection is referred to as a subscription. The two types of subscriptions are durable and non-durable sunbsriptions, where Fiorano Output Ports are Topics with non-durable subscriptions. Non-durable subscriptions, under certain scenarios, can lead to message loss. Therefore, in those cases where delivery of each message is important, Fiorano recommends the usage of durable subscriptions.

Other scenarios in which enabling durable routes could be helpful are:

  • Peer restart: During the event of a peer server restart while messages are flowing continuously through a route.
  • Peer failover: During the event of a peer server failover while messages are flowing continuously through a route.
  • Restarting a Child event process connected to a remote component: When a child event process is stopped, where its parent application is still processing messages, then the child application is bound to lose those messages. This is explained in detail under the Durable routes in Child Application section.

Setting Durable Subscribers

Durable subscription can be enabled at three levels as mentioned below.

Route level

  1. Create the Event Process and select the route where you want Durable Subscription to be enabled.
  2. In the Properties panel, select the Messaging tab.
  3. From the Durability Source drop-down menu, choose Route.
  4. From the Durable drop-down menu above, select 'Yes'.

Application Level

  1. Create the Event Process.
  2. In the Properties panel, select the General tab.
  3. From the Durable Routes drop-down menu, select 'Yes'.

FES level

  1. Open the Connection Management panel and login to FES-JMX.
  2. Navigate through JMX-Connection > Fiorano > ESB > Application > Controller > Application Controller > Application Controller and select config.
  3. In the Properties panel on the right side, select the Route Durable value 'Yes'.
  4. Right-click FES-JMX and click Save Configurations.

Priority

Enabling Durable Subscription at the FES level sets every route in every event processes to durable. However, one can go to the individual event process and set the durable subscription for that particular event process at the Application Level; the subscription set at this level will override the one set at the FES Level. The order below represents the order of priority for processing:

  1. Route level
  2. Application Level
  3. FES Level

Durable routes in Child Application

If a child application holds a durable route from a remote component, once the applications are started, durable subscription is established at the output port of the remote component. This durable subscriber will not be removed when the child application is stopped. The messages that are processed in the parent application when the child application is killed will not be lost and when the child application is started again, the Child application will receive the messages.

Icon
  • The child application should be started at least once after starting the parent application so that the durable subscription is established.
  • When the parent application is stopped, all the subscriptions including the durable subscriptions will be removed and thereby the stored messages will be deleted. To prevent this, set deleteDestiantionAfterStop to 'No' in the parent application.

Corner Cases

Icon
  • When the child is stopped, its durable subscribers move to the passive state. If the corresponding pee server is killed and if the application/route is renamed/deleted, then an error appears in the FES logs saying that the subscriber cannot be removed, as the corresponding peer server is not present.
    Once the corresponding peer server is running, refer to the Managing Durable Subscribers section below to view and remove the unused subscribers.
  • The parent is always launched fist and then the child application is launched. In this time interval, if the parent application processes some messages, then those messages won't be received in the child application.

Corresponding Peer

Icon

'Corresponding peer' represents the peer server where the remote component (which is also the source of the Durable route) is deployed.

Managing Durable Subscribers

Managing durable subscribers can be done through the JMX as well as the FMQ Dashboard. Managing subscribers involves viewing and removing subscribers.

JMX (ConnectionManagement)

View Durable Subscribers

To see all the durable subscribers in the peer server perform the actions below:

  1. Logon to the corresponding peer server's FPS-JMX
  2. Navigate through Fiorano > MQ > pubsub > PubSubsManager > TopicSubsSystem
  3. Right-click TopicSubsSystem and select View Operations.
  4. In the TopicSubsSystem dialog box, click listActivePassiveSubscriberInfo() from the list on the left side, and then click the button with the corresponding operation name present under the Invoke Operation section in the Operation tab on the right side to invoke the Result tab.

    Icon

    listActivePassiveSubscriberInfo() is the button name in this context



  5. The Result tab displays the list of existing subscribers in the peer server. Click the small button next to the value of the subscriber (Item) to view the subscriber details.


    Subscriber Details

    Icon

    Item 1: Subscription Name
    Item 2: Client ID
    Item 3: The state which can be active or passive
    Item 4: The number of deliverable messages
    Item 5: The topic name 
    Item 6: The number of active subscribers
    Item 7: Whether or not it is shared (true or false)

Remove Passive Durable Subscribers

Icon

Removing a durable subscriber also involves removing the stored messages associated with the subscriber.

Logon to the corresponding peer server's FPS-JMX, and navigate to Fiorano>ESB>Peer>Core>ProcessManager>EventProcessManager> removeSimilarSubscribers(string)

  • To remove all the passive subscribers in an application, pass the application GUID as the input to the above JMX call.
  • To remove only the subscriber of a route, pass the client ID of the route subscriber as the input to the same JMX call.
  • To remove all the passive durable subscribers in the corresponding peer server, use the method removePassiveRouteSubscribers() under EventProcessManager.
  • To remove a particular passive durable subscriber, use the method removeSubscribers(clientID, subscriberID) under EventProcessManager. The parameters for this call such as clientID and SubscriberID can be referred in View Durable Subscribers.

    Icon

    While using this call to remove subscribers, passive subscribers and not the active ones will be removed (Refer to Remove Durable Subscribers).

FMQ Dashboard

By default, the FMQ Dashboard is disabled. To enable the FMQ Dashboard, perform the actions below:

  1. Open the corresponding peer server in the Profile Management perspective.

    Icon

    The corresponding peer server should not be running while editing the profile information.

  2. Navigate to Fiorano > etc and click JettyServer.
  3. Enable the enablestart option, and change the jetty server PortNumber is required to be changed.

Use the URL in the format below to login to the corresponding FMQ Dashboard:

Icon

Enabling FMQ dashboard will be an additional load on the server.

View Durable Subscribers

To display all the durable subscribers in the FMQ Dashboard, click the Durable Subscriptions tab from the left navigation panel and then click the Monitor Durable Subscription link under it. This will display all the durable subscribers and their details in a tabular format on the right side.

Icon

To update the messages column, click on the header label.

Remove Durable Subscribers

Icon

Removing a durable subscriber involves removing the stored messages associated with the subscriber.

  • To remove the passive durable subscriber, click the Configure Durable Subscription link under the Durable Subscription tab.
  • Select all the Subscription Name items which need to be removed, select Unsubscribe from the Select Action drop-down menu on the top and then click the Go button present next t to the drop-down menu.
Icon

Take caution while using this method, since active subscribers. may be accidentally removed.

Adaptavist ThemeBuilder EngineAtlassian Confluence