Tabnine Logo
SuroKeyedMessage.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.netflix.suro.sink.kafka.SuroKeyedMessage
constructor

Best Java code snippets using com.netflix.suro.sink.kafka.SuroKeyedMessage.<init> (Showing top 3 results out of 315)

origin: com.netflix.suro/suro-kafka

@Override
public void writeTo(MessageContainer message) {
  long key = msgId++;
  if (!keyTopicMap.isEmpty()) {
    try {
      Map<String, Object> msgMap = message.getEntity(new TypeReference<Map<String, Object>>() {});
      Object keyField = msgMap.get(keyTopicMap.get(message.getRoutingKey()));
      if (keyField != null) {
        key = keyField.hashCode();
      }
    } catch (Exception e) {
      log.error("Exception on getting key field: " + e.getMessage());
    }
  }
  enqueue(new SuroKeyedMessage(key, message.getMessage()));
}
origin: com.netflix.suro/suro-kafka-producer

@Override
public void writeTo(MessageContainer message) {
  long key = msgId++;
  if (!keyTopicMap.isEmpty()) {
    try {
      Map<String, Object> msgMap = message.getEntity(new TypeReference<Map<String, Object>>() {});
      Object keyField = msgMap.get(keyTopicMap.get(message.getRoutingKey()));
      if (keyField != null) {
        key = keyField.hashCode();
      }
    } catch (Exception e) {
      QueuedSink.log.error("Exception on getting key field: " + e.getMessage());
    }
  }
  QueuedSink.log.trace( "KafkaSink writeTo()" );
  receivedCount.incrementAndGet();
  enqueue(new SuroKeyedMessage(key, message.getMessage()));
}
origin: com.netflix.suro/suro-kafka-producer

for( Message m : msgList ){
  SuroKeyedMessage sKeyedMsg = (SuroKeyedMessage) m;
  msgCopies.add( new SuroKeyedMessage( sKeyedMsg.getKey(), 
                     new Message( m.getRoutingKey(), m.getPayload() )));
com.netflix.suro.sink.kafkaSuroKeyedMessage<init>

Popular methods of SuroKeyedMessage

  • getKey
  • getPayload
  • getRoutingKey

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • requestLocationUpdates (LocationManager)
  • startActivity (Activity)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JOptionPane (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now