The bus provides a way to subscribe to events from any of the services running. It's implemented abstract from transport specific implementation. The primary use of the bus in aipgcore Node is for subscribing to events via a web socket.
// a node is needed to be able to open a bus
var node = new Node(configuration);
// will create a new bus that is ready to subscribe to events
var bus = node.openBus();
// will remove all event listeners
bus.close();
// subscribe to all transaction events
bus.subscribe('aipgd/rawtransaction');
// to subscribe to new block hashes
bus.subscribe('aipgd/hashblock');
// unsubscribe
bus.unsubscribe('aipgd/rawtransaction');