Package com.netflix.suro.sink.kafka

Examples of com.netflix.suro.sink.kafka.SuroKeyedMessage


    @Test
    public void testSuroKeyedMessage() {
        MessageSerDe serde = new MessageSerDe();
        for (int k = 0; k < 10; ++k) {
            Message msg = new SuroKeyedMessage(
                    k,
                    new Message("routingKey", "payload".getBytes()));
            byte[] bytes = serde.serialize(msg);
            SuroKeyedMessage suroKeyedMessage = (SuroKeyedMessage) serde.deserialize(bytes);
            assertEquals(msg, suroKeyedMessage);
            assertEquals(suroKeyedMessage.getKey(), k);
        }
    }
View Full Code Here

TOP

Related Classes of com.netflix.suro.sink.kafka.SuroKeyedMessage

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.