Datameer Event Bus
 Datameer Event Bus is available with Datameer's Advanced Governance module.
Datameer's event bus pushes events that take place within workbooks and for permissions. Developers can create a plug-in to subscribe and listen to all or specific events that are being sent on the bus. These events can then be used to record or automate other processes. For example, sending an email out after a workbook has successfully completed.
Accessing Datameer's Event Bus
Build a plug-in that subscribes to workbook events following the directions on Using the Plug-in SDKÂ with the DatameerEventBus extension.
This example is of a logging subscriber that listens to a specific event. The following is subscribed to all events that are published.
package datameer.das.plugin.prototypes.eventbus.extension; import org.apache.log4j.Logger; import datameer.com.google.common.eventbus.Subscribe; import datameer.dap.sdk.event.DatameerEventBusSubscriber; public final class SimpleLoggingEventSubscriber extends DatameerEventBusSubscriber { private final Logger _logger = Logger.getLogger(SimpleLoggingEventSubscriber.class); @Override public String getName() { return "Records every published event via Log4j"; } @Subscribe public void handle(final Object input) { _logger.info(input); } }
The plug-in can listen to multiple events simultaneously by adding in additional subscriptions as seen below:
@Subscribe public void handle(final FileEvent input) { _logger.info(input); }
Default property
Name | Default | Description |
---|---|---|
event.bus.async.threads | 4 | Determines if the Datameer Event Bus should dispatch events asynchronously by specifying the number of background threads to be used. When an event begins, all registered subscribers for an event are run in sequence, so subscribers run quickly. If subscribers are in use that trigger an extended process (such as a database load) we recommend running the bus asynchronously. |
Our customer services specialists can assist you with more information if required. Â