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.
- Create the Event Process and select the route where you want Durable Subscription to be enabled.
- In the Properties panel, select the Messaging tab.
- From the Durability Source drop-down menu, choose Route.
- From the Durable drop-down menu above, select 'Yes'.
- Create the Event Process.
- In the Properties panel, select the General tab.
- From the Durable Routes drop-down menu, select 'Yes'.
- Open the Connection Management panel and login to FES-JMX.
- Navigate through JMX-Connection > Fiorano > ESB > Application > Controller > Application Controller > Application Controller and select config.
- In the Properties panel on the right side, select the Route Durable value 'Yes'.
- Right-click FES-JMX and click Save Configurations.
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:
- Route level
- Application Level
- 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.
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.
View Durable Subscribers
To see all the durable subscribers in the peer server perform the actions below:
- Logon to the corresponding peer server's FPS-JMX
- Navigate through Fiorano > MQ > pubsub > PubSubsManager > TopicSubsSystem
- Right-click TopicSubsSystem and select View Operations.
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.
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.
Remove Passive Durable Subscribers
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.
By default, the FMQ Dashboard is disabled. To enable the FMQ Dashboard, perform the actions below:
Open the corresponding peer server in the Profile Management perspective.
- Navigate to Fiorano > etc and click JettyServer.
- 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:
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.
Remove Durable Subscribers
- 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.