Package org.apache.airavata.wsmg.client

Examples of org.apache.airavata.wsmg.client.WseMsgBrokerClient.publish()


        WseMsgBrokerClient client = new WseMsgBrokerClient();
        client.init(BROKER_URL);

        OMElement msg = WorkFlowUtils.reader2OMElement(new StringReader(CommonUtils.WORKFLOW_INITIALIZED_NOTIFICATION));

        client.publish(TEST_TOPIC, msg);

        EndpointReference MSG_BOX_EPR = subscription.getMessageBoxEPR();
        System.out.println(MSG_BOX_EPR);
        String subscriptionID = subscription.getSubscriptionID();
        Callback testCallback2 = new Callback() {
View Full Code Here


        WseMsgBrokerClient client = new WseMsgBrokerClient();
        client.init(BROKER_URL);

        OMElement msg = OMAbstractFactory.getOMFactory().createOMElement("test", null);
        msg.setText("mustwork");
        client.publish(TOPIC, msg);
        // sub.destroy();

        msg.setText("destroyed");
        client.publish(TOPIC, msg);
        Subscription sub2 = LeadNotificationManager.renewMessageboxSubscription(BROKER_URL, sub.getMessageBoxEPR(),
View Full Code Here

        msg.setText("mustwork");
        client.publish(TOPIC, msg);
        // sub.destroy();

        msg.setText("destroyed");
        client.publish(TOPIC, msg);
        Subscription sub2 = LeadNotificationManager.renewMessageboxSubscription(BROKER_URL, sub.getMessageBoxEPR(),
                sub.getSubscriptionID(), TOPIC, null, false);

        msg.setText("mustworkagain");
        client.publish(TOPIC, msg);
View Full Code Here

        client.publish(TOPIC, msg);
        Subscription sub2 = LeadNotificationManager.renewMessageboxSubscription(BROKER_URL, sub.getMessageBoxEPR(),
                sub.getSubscriptionID(), TOPIC, null, false);

        msg.setText("mustworkagain");
        client.publish(TOPIC, msg);

        System.out.println(sub2.getSubscriptionID());
        while (counter < 2) {
            Thread.sleep(1000);
        }
View Full Code Here

        OMElement msg = WorkFlowUtils.reader2OMElement(new StringReader(CommonUtils.WORKFLOW_INITIALIZED_NOTIFICATION));

        for (int j = 0; j < NUMBER_OF_SUBSCRIBERS; j++) {
            for (int i = 0; i < NOTIFICATIONS_PUBLISHED; i++) {

                client.publish(TEST_TOPIC, msg);

                Thread.sleep(100);
            }
        }
View Full Code Here

        OMElement omMsg = createMsg(count, getName(), uuid.toString());
        System.out.println(String.format(
            "producer [%s] sending msg: %s", getName(), omMsg
                .toString()));

        client.publish(topicExpression, omMsg);

        TimeUnit.SECONDS.sleep(timeInterval);
      }

    } catch (InterruptedException e) {
View Full Code Here

        client.init(BROKER_URL);

        for (int j = 0; j < NUMBER_OF_SUBSCRIBERS; j++) {
            for (int i = 0; i < NOTIFICATIONS_PUBLISHED; i++) {

                client.publish("topic" + j, CommonUtils.WORKFLOW_INITIALIZED_NOTIFICATION);

                Thread.sleep(100);
            }
        }
View Full Code Here

        WseMsgBrokerClient client = new WseMsgBrokerClient();
        client.init(brokerPublishEPR);

        OMElement msg = OMAbstractFactory.getOMFactory().createOMElement("testMessage", null);
        msg.setText("some message");
        client.publish(TOPIC, msg);

        Thread.sleep(10000);
        for (int i = 0; i < messages; ++i) {
            try {
                Thread.sleep(1000);
View Full Code Here

        }

        Thread.sleep(10000);

        for (int i = 0; i < messages; ++i) {
            client.publish(TOPIC, msg);

            Thread.sleep(100);

        }
View Full Code Here

            }
            System.out.println("Destroyed");
            WseMsgBrokerClient client = new WseMsgBrokerClient();
            client.init(BROKER_URL);
            try {
                client.publish(TOPIC, "some message");
            } catch (MsgBrokerClientException e) {
                e.printStackTrace();
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.