Tabnine Logo
JetstreamEvent.setForwardingTopics
Code IndexAdd Tabnine to your IDE (free)

How to use
setForwardingTopics
method
in
com.ebay.jetstream.event.JetstreamEvent

Best Java code snippets using com.ebay.jetstream.event.JetstreamEvent.setForwardingTopics (Showing top 4 results out of 315)

origin: pulsarIO/realtime-analytics

  @Override
  public void sendEvent(JetstreamEvent event) throws EventException {
    String key = JetstreamReservedKeys.EventReplayTopic.toString();

    if (event.containsKey(key)) {
      String retryTopic = (String) event.get(key);
      if (retryTopic != null && retryTopic.length() != 0) {
        retryTopic = "Replay-" + retryTopic.replaceAll("/", "-");
        event.setForwardingTopics(new String[] { retryTopic });
      }
    }

    super.sendEvent(event);
  }
}
origin: pulsarIO/realtime-analytics

  @Override
  public void sendEvent(JetstreamEvent event) throws EventException {
    String key = JetstreamReservedKeys.EventReplayTopic.toString();

    if (event.containsKey(key)) {
      String retryTopic = (String) event.get(key);
      if (retryTopic != null && retryTopic.length() != 0) {
        retryTopic = "Replay-" + retryTopic.replaceAll("/", "-");
        event.setForwardingTopics(new String[] { retryTopic });
      }
    }

    super.sendEvent(event);
  }
}
origin: pulsarIO/realtime-analytics

private void flushMetrics(MetricDef metricDef) {
  Counter count = metrics.get(metricDef);
  count.mark();
  if (count.getLastDeltaValue() > 0) {
    Map<String, Object> internalMap = new HashMap<String, Object>();
    internalMap.put(MCConstant.METRIC_COUNT, count.getLastDeltaValue());
    internalMap.put(MCConstant.METRIC_NAME, metricDef.getMetricName());
    internalMap.put(MCConstant.GROUP_ID, metricDef.getMetricGroup());
    internalMap.put(MCConstant.METRIC_TIME, metricDef.getMetricTime());
    internalMap.put(MCConstant.METRIC_FREQUENCY,
        metricDef.getFrequency());
    internalMap.put(affinityKey, metricDef.getAffinityKey());
    JetstreamEvent event = new JetstreamEvent(
        metricDef.getMetricTable(), null, internalMap);
    event.setForwardingTopics(metricDef.getTopics());
    fireSendEvent(event);
    incrementEventSentCounter();
  }
}
origin: pulsarIO/realtime-analytics

event.setForwardingTopics(null);
super.fireSendEvent(event);
com.ebay.jetstream.eventJetstreamEventsetForwardingTopics

Popular methods of JetstreamEvent

  • get
  • <init>
  • containsKey
  • put
  • getEventType
  • remove
  • setEventType
  • clone
  • entrySet
  • getForwardingTopics
  • getMetaData
  • addMetaData
  • getMetaData,
  • addMetaData,
  • getEventId,
  • getForwardingUrls,
  • keySet,
  • putAll,
  • size,
  • toString

Popular in Java

  • Creating JSON documents from java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • String (java.lang)
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top 12 Jupyter Notebook extensions
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