Package org.apache.hedwig.protocol.PubSubProtocol

Examples of org.apache.hedwig.protocol.PubSubProtocol.PublishResponse


        for (int i=0; i<numMessages; i++) {
            String str = prefix + i;
            ByteString data = ByteString.copyFromUtf8(str);
            Message msg = Message.newBuilder().setBody(data).build();
            PublishResponse response = publisher.publish(topic, msg);
            assertNotNull(response);
            publishedMsgs.put(str, response.getPublishedMsgId());
        }

        assertTrue("Timed out waiting on callback for messages.",
                   receiveLatch.await(30, TimeUnit.SECONDS));
        assertEquals("Should be expected " + numMessages + " messages.",
View Full Code Here

TOP

Related Classes of org.apache.hedwig.protocol.PubSubProtocol.PublishResponse

Copyright © 2018 www.massapicom. 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.