WebSphere MQ File Transfer Edition is a product that I work on, at it’s basic level it allows users to transfer files from A to B using WebSphere MQ as the transport. Maybe another day I’ll blog about it, but you can read some more information here. WebSphere Service Registry and Repository (WSRR) is a product developed at IBM Hursley labs, and fits into the Governance space of applications (at least in my eyes, please correct me if wrong!). It does many many things, read here for more information. The part I am particularly interested in is the developing of custom models and relationships to store user defined information, in this case WMQ File Transfer Edition objects and MQ Queue Managers. This is what the SupportPac FA01 does.
SupportPac FA01 supplies an OWL file, which defines Agent, Queue Manager and MQ Connection objects and the relationships (Agent -> MQConnection <- Queue Manager) which allows us to model an FTE network inside WSRR. The SupportPac uses the WSRR Service Discovery Framework and the scheduler to keep the information current and up to date. Information on developing your own custom Service Discovery services can be found here.
Once data is in WSRR it allows users to query FTE objects, and perform transfers based on their own rules and requirements. Using the WSRR Rest API users can easily develop web or clientside applications that can exploit the FTE network information.
The SupportPac contains all the information required to install and configure the Service Discovery plugin, however in a later post I plan to put the information here for everyone to see.
Categories: IBM · SupportPacs · WMQFTE
Tagged: supportpac, websphere, WMQFTE, wsrr
Just a quick post about WebSphere MQ Java Pub/Sub functionality. I have need to write an application that uses the Base Java Classes for WebSphere MQ, making use of some Pub/Sub. There is a fair amount of information on the web on how to subscribe but no information on how to unsubscribve. To subscribe to a topic all you need to do once you have a MQQueueManager object is the following:
int options = CMQC.MQSO_CREATE | CMQC.MQSO_RESUME | CMQC.MQSO_DURABLE | CMQC.MQSO_FAIL_IF_QUIESCING;
MQTopic topic = qmgr.accessTopic("topicName", "topicObject", options, null, "DurabeIdentifier");
Now you have the MQTopic object you can get messages that are published to the topic “topicObject/topicName”. As I mentioned the reason for this post was the lack of any information on the web, including the WebSphere MQ Using Java V7 manual, and the WebSphere MQ V7 infocenter on how to unsubscribe from the topic. Well eventually I gave up on the web, and decided to look at the MQ Test material that we have here at Hursley. The following code will unsubscribe from the topic:
if (topic != null) {
if (topic.isSubscribed()) {
topic.getSubscriptionReference().setCloseOptions(CMQC.MQCO_REMOVE_SUB);
topic.getSubscriptionReference().close();
}
topic.setCloseOptions(CMQC.MQCO_DELETE);
topic.close();
}
That will check if your topic is not null, is subscribed and then set some options to ensure that the subscription is deleted. Job done and only an hour wasted searching the docs!
Update:You do not need to use topic.setCloseOptions(CMQC.MQCO_DELETE);. This would actually throw an MQRC_OPTION_NOT_VALID_FOR_TYPE (mqrc 2045) error!
Categories: IBM · WebSphere MQ
Tagged: mq, pubsub, webpsheremq, websphere