WebSphere MQ Everyplace ノードは、WebSphere Business Integration Event Broker のパブリッシュ/サブスクライブ機能の限定サブセットをサポートしています。
WebSphere Business Integration Event Broker へ流れる、ブリッジ・キューにあてたすべてのメッセージについては、メッセージ・タイプを指定する必要があります。 パブリッシュ・メッセージの場合、これは MQeMbMsgObject.TYPE_PUB です。
利用できるフィールド名は、以下のとおりです。
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); }
サブスクリプション・メッセージに指定する必要のあるメッセージ・タイプは、 MQeMbMsgObject.TYPE_SUB です。 利用できるフィールド名は、以下のとおりです。
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); }
アンサブスクライブ・メッセージに指定する必要のあるメッセージ・タイプは、 MQeMbMsgObject.TYPE_UNSUB です。 利用できるフィールド名は、以下のとおりです。
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 は今のところ、ここで説明されていない別の機能はサポートしていません。 Request Update など、WebSphere MQ でサポートされているメッセージはサポートされていません。
注意 |
商標 |
ダウンロード |
ライブラリー |
技術サポート |
フィードバック
![]() ![]() |
ac10180_ |