Package com.taobao.metamorphosis.client.producer

Examples of com.taobao.metamorphosis.client.producer.XAMessageProducer.publish()


            throws Exception {
        this.messages = new ArrayList<Message>();
        for (int j = 0; j < num; j++) {
            // ��Ҫ����topic
            final XAMessageProducer messageProducer = (XAMessageProducer) this.producerList.get(j);
            messageProducer.publish(topic);

            for (int i = 0; i < count; i++) {
                final byte[] data = ("hello" + j + i).getBytes();
                final Message msg = new Message(topic, data);
                final XAResource xares = messageProducer.getXAResource();
View Full Code Here


        final String topic = "meta-test";
        final XAMessageSessionFactory xasf = getXAMessageSessionFactory();
        // create XA producer,it should be used as a singleton instance.
        XAMessageProducer xaMessageProducer = xasf.createXAProducer();
        // publish topic
        xaMessageProducer.publish(topic);
        // create XA datasource,reuse it.
        final XADataSource xads = getXADataSource();

        final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String line = null;
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.