I was asked to give advice on how to use Informatica to subscribe to a durable topic hosted on ActiveMQ.
It's quite easy to make a Java subscriber durable. The tricky thing related to Informatica subscriber is that this has to be configured inside Informatica while how the configuration should be done is somehow defined by JMS providers.
In order to connect to ActiveMQ durable topic, both subscriber name and clientid are required to be provided by subscribers. Subscriber name can be configured in Informatica JMS adapter (as the data source) however besides that it doesn't allow people to set the clientid. So the first thing came to my mind was to set the clientid on connectionfactory. But it didn't work by adding clientid as a property to connectionfactory.
An alternative is to modify the connection url of Informatica connection. In the end, it proved to work by appending "?jms.clientID=xxinf" to the url. A lot more attributes can be appended to the url; details are described here: http://activemq.apache.org/connection-configuration-uri.html .
Showing posts with label subscribe. Show all posts
Showing posts with label subscribe. Show all posts
Wednesday, June 18, 2014
Monday, August 19, 2013
DGrid data refreshing event?
I'm working on dojo chart generation based on the data from dojo dgrid.
The logic I'm building is as follows:
1. Subscribe to a topic in the main page:
connect.subscribe("dgridrefresh", mModule.generateRestChart);
2. Initiate a JsonRest datastore. Use the datastore to create a dgrid with pagination plugin.
3. Start the dgrid in some contentpane.
4. Publish an event to a topic upon "dgrid-refresh-complete" event.
The code is as follows (topicname is the paramter):
dgrid.on("dgrid-refresh-complete", function(event) {
console.log("refresh-complete. Publishing to " + topicname);
require(["dojo/_base/connect"], function(connect) {
connect.publish(topicname, [event]);
});
});
However, I observed that mModule.generateRestChart() function was only invoked once when the dgrid was initiated. I expect the method being called whenever pagination is executed.
Same information is here:http://dojo-toolkit.33424.n3.nabble.com/get-data-refresh-notification-from-dgrid-with-jsonrest-datastore-td3998670.html
In the end, it turned out the dgrid-refresh-complete event will only be emitted once when dgrid is refreshed with loading the first page of data.
I did a workaround by customizing the pagination plugin for dgrid. The change I made was pretty simple: inside the Deferred block of gotoPage method of dgrid.extensions.Pagination, I added another emit of dgrid-navigation-complete event, which is a customized event by myself.
The logic I'm building is as follows:
1. Subscribe to a topic in the main page:
connect.subscribe("dgridrefresh", mModule.generateRestChart);
2. Initiate a JsonRest datastore. Use the datastore to create a dgrid with pagination plugin.
3. Start the dgrid in some contentpane.
4. Publish an event to a topic upon "dgrid-refresh-complete" event.
The code is as follows (topicname is the paramter):
dgrid.on("dgrid-refresh-complete", function(event) {
console.log("refresh-complete. Publishing to " + topicname);
require(["dojo/_base/connect"], function(connect) {
connect.publish(topicname, [event]);
});
});
However, I observed that mModule.generateRestChart() function was only invoked once when the dgrid was initiated. I expect the method being called whenever pagination is executed.
Same information is here:http://dojo-toolkit.33424.n3.nabble.com/get-data-refresh-notification-from-dgrid-with-jsonrest-datastore-td3998670.html
In the end, it turned out the dgrid-refresh-complete event will only be emitted once when dgrid is refreshed with loading the first page of data.
I did a workaround by customizing the pagination plugin for dgrid. The change I made was pretty simple: inside the Deferred block of gotoPage method of dgrid.extensions.Pagination, I added another emit of dgrid-navigation-complete event, which is a customized event by myself.
Subscribe to:
Posts (Atom)