kappa_sdk.EventBus#

class kappa_sdk.EventBus(service_address, access_token, buffer_size=1000, verify_ssl=True)[source]#

KAPPA Automate event bus.

SignalR-based event bus, running in a separate thread.

Note

Should not be instantiated directly.

Parameters:
  • service_address (str) – The address of the Signal-R event bus.

  • buffer_size (int) – The size of the message buffer for retrospective subscription. The event bus will keep a given number of messages and will feed them to each new subscriber, so the subscriber wouldn’t miss the events due to the eventual timing consistency.

  • access_token (str | None)

  • verify_ssl (bool)

Attributes

EventBus.daemon

A boolean value indicating whether this thread is a daemon thread.

EventBus.ident

Thread identifier of this thread or None if it has not been started.

EventBus.name

A string used for identification purposes only.

EventBus.native_id

Native integral thread ID of this thread, or None if it has not been started.

Methods

EventBus.getName()

Return a string used for identification purposes only.

EventBus.isDaemon()

Return whether this thread is a daemon.

EventBus.is_alive()

Return whether the thread is alive.

EventBus.join([timeout])

Wait until the thread terminates.

EventBus.run()

Starts the event bus.

EventBus.setDaemon(daemonic)

Set whether this thread is a daemon.

EventBus.setName(name)

Set the name string for this thread.

EventBus.start()

Start the thread's activity.

EventBus.stop()

Stops the event bus.

EventBus.subscribe(event_handler, event_filter)

Subscribes to events.

EventBus.subscribe_topic(event_handler, ...)

Subscribes to events by topic.

EventBus.unsubscribe(subscription_token)

Unsubscribes the event handler.