The WebSphere MQ Everyplace nodes support a limited subset of the publish/subscribe capability of WebSphere Business Integration Event Broker.
As with all messages destined for a bridge queue going to WebSphere Business Integration Event Broker, a message type must be specified. For a publish message, this is MQeMbMsgObject.TYPE_PUB.
The field names available are as follows:
try { System.out.println("Local QM Name: " + myQM.getName()); MQeMsgObject mqeMsg = new MQeMsgObject(); mqeMsg.putInt(MQeMbMsgObject.TYPE_OF_MSG, MQeMbMsgObject.TYPE_PUB); mqeMsg.putAscii(MQeMbMsgObject.TOPIC, "Weather"); mqeMsg.putArrayOfByte(MQeMbMsgObject.MESSAGE, asciiToByte("Hello"); mqeMsg.putBoolean(MQeMbMsgObject.RETAINED, true); System.out.println("..Put message to QM/queue: " + destQueueManager + "/" + destBridgeQueue); myQM.putMessage(destQueueManager, destBridgeQueue, mqeMsg, null, 0); System.out.println("Finished"); } catch (Exception e) { e.printStackTrace(); System.out.println("Failed! " + e); }
The message type that must be specified for a subscription message is MQeMbMsgObject.TYPE_SUB. The fields names available are as follows:
try { System.out.println("Local QM Name: " + myQM.getName()); MQeMsgObject mqeMsg = new MQeMsgObject(); mqeMsg.putInt(MQeMbMsgObject.TYPE_OF_MSG, MQeArgoLaunch.TYPE_SUB); mqeMsg.putAsciiArray(MQeMbMsgObject.TOPIC, new String[] {"Topic1", "Topic2", "Topic3"}); mqeMsg.putAscii(MQeMbMsgObject.MQ_DestQueueName, "Inbox"); mqeMsg.putAscii(MQeMbMsgObject.MQ_DestQueueMgr, "ServerQM1"); System.out.println("..Put message to QM/queue: " + destQueueManager + "/" + destBridgeQueue); myQM.putMessage(destQueueManager, destBridgeQueue, mqeMsg, null, 0); System.out.println("Finished"); } catch (Exception e) { e.printStackTrace(); System.out.println("Failed! " + e); }
The message type that must be specified for an unsubscription message is MQeMbMsgObject.TYPE_UNSUB. The fields names available are as follows:
try { System.out.println("Local QM Name: " + myQM.getName()); MQeMsgObject mqeMsg = new MQeMsgObject(); mqeMsg.putInt(MQeMbMsgObject.TYPE_OF_MSG, MQeArgoLaunch.TYPE_UNSUB); mqeMsg.putAsciiArray(MQeMbMsgObject.TOPIC, new String[] {"Topic1", "Topic2", "Topic3"}); mqeMsg.putAscii(MQeMbMsgObject.MQ_DestQueueName, "Inbox"); mqeMsg.putAscii(MQeMbMsgObject.MQ_DestQueueMgr, "ServerQM1"); System.out.println("..Put message to QM/queue: " + destQueueManager + "/" + destBridgeQueue); myQM.putMessage(destQueueManager, destBridgeQueue, mqeMsg, null, 0 ); System.out.println("Finished"); } catch (Exception e) { e.printStackTrace(); System.out.println("Failed! " + e); }WebSphere MQ Everyplace currently does not support any additional features not described here. Messages supported in WebSphere MQ such as request update, are not supported.
Related concepts
WebSphere MQ Mobile Transport
WebSphere MQ Everyplace messages
Related reference
WebSphere MQ Mobile Transport
WebSphere MQ Everyplace point-to-point methods
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ac10180_ |