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. 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 as a subscription. The two types of subscriptions are durable and non-durable, where Fiorano Output Ports are Topic with non-durable subscriptions. Such kind of subscription, 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 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, choose Route.
  4. From the Durable drop-down above, select 'Yes'.

Application Level

  1. Create the Event Process.
  2. In the Properties panel and select the General tab.
  3. From Durable Routes drop-down, 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 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 Application Level; the subscription set at this level will override the one set at the FES Level. Precisely, the priority is in the following order:

  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 parent application when the child application is killed will not be lost; hence, once the child application is started again, it will receive them.

Icon
  • The child application should be started at least once after starting 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 get 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 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, since the corresponding peer server is not present.
    Once the corresponding peer server is up, refer 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 in two ways through JMX and 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 following actions:

  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 pop-up, click listActivePassiveSubscriberInfo() from the list on the left side, and then click the button with the respective operation name present under 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 respective subscriber (Item) to view the subscriber details in a pop-up window.


    Subscriber Details

    Icon

    Item 1 is the Subscription Name
    Item 2 is the Client ID
    Item 3 is the state which can be active or passive
    Item 4 is the number of deliverable messages
    Item 5 is the topic name 
    Item 6 is the number of active subscribers
    Item 7 is whether it is shared or not. Can be either true or false 

Remove Passive Durable Subscribers

Removing a durable subscriber also involves removing the stored messages associated with the subscriber, so take caution while performing the following operation.
Logon to the corresponding peer server's FPS-JMX, and navigate through
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, that is, clientID and SubscriberID can be referred in View Durable Subscribers.

    Icon

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

    The following figure provides a better picture.

FMQ Dashboard

By default, FMQ Dashboard will be disabled. To enable the same, perform the following actions:

  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 through Fiorano > etc and click JettyServer.
  3. Enable the enablestart option and if needed, change the jetty server PortNumber.

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

Icon

Enabling FMQ dashboard will be an addition load to 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 its details in a tabular format on the right side.

Icon

To update messages column, click on the header label.

Remove Durable Subscribers

Removing a durable subscriber also involves removing the stored messages associated with the subscriber, so user has to take caution while performing the this operation.

  • 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 on the top and then click the Go button present next t to the drop-down.
Icon

Take caution while using this method, since you may potentially remove active subscribers.

Adaptavist ThemeBuilder EngineAtlassian Confluence