Skip to content

EventMessagingHandler

QuantConnect.Messaging.EventMessagingHandler

Bases: Object, IMessagingHandler

Desktop implementation of messaging system for Lean Engine

has_subscribers

has_subscribers: bool

Gets or sets whether this messaging handler has any current subscribers. When set to false, messages won't be sent.

debug_event

debug_event: _EventContainer[
    Callable[[DebugPacket], Any], Any
]

system_debug_event

system_debug_event: _EventContainer[
    Callable[[SystemDebugPacket], Any], Any
]

log_event

log_event: _EventContainer[Callable[[LogPacket], Any], Any]

runtime_error_event

runtime_error_event: _EventContainer[
    Callable[[RuntimeErrorPacket], Any], Any
]

handled_error_event

handled_error_event: _EventContainer[
    Callable[[HandledErrorPacket], Any], Any
]

backtest_result_event

backtest_result_event: _EventContainer[
    Callable[[BacktestResultPacket], Any], Any
]

consumer_ready_event

consumer_ready_event: _EventContainer[
    Callable[[], Any], Any
]

backtest_result_event_raised

backtest_result_event_raised(
    packet: BacktestResultPacket,
) -> None

consumer_ready_event_raised

consumer_ready_event_raised() -> None

debug_event_raised

debug_event_raised(packet: DebugPacket) -> None

dispose

dispose() -> None

Dispose of any resources

handled_error_event_raised

handled_error_event_raised(
    packet: HandledErrorPacket,
) -> None

initialize

initialize(
    initialize_parameters: MessagingHandlerInitializeParameters,
) -> None

Initialize the Messaging System Plugin.

Parameters:

Name Type Description Default
initialize_parameters MessagingHandlerInitializeParameters

The parameters required for initialization

required

loading_complete

loading_complete() -> None

Set Loaded to true

log_event_raised

log_event_raised(packet: LogPacket) -> None

on_backtest_result_event

on_backtest_result_event(
    packet: BacktestResultPacket,
) -> None

Raise a backtest result event safely.

This codeEntityType is protected.

on_consumer_ready_event

on_consumer_ready_event() -> None

Handler for consumer ready code.

on_debug_event

on_debug_event(packet: DebugPacket) -> None

Raise a debug event safely

This codeEntityType is protected.

on_handled_error_event

on_handled_error_event(packet: HandledErrorPacket) -> None

Raise a handled error event safely

This codeEntityType is protected.

on_log_event

on_log_event(packet: LogPacket) -> None

Raise a log event safely

This codeEntityType is protected.

on_runtime_error_event

on_runtime_error_event(packet: RuntimeErrorPacket) -> None

Raise runtime error safely

This codeEntityType is protected.

on_system_debug_event

on_system_debug_event(packet: SystemDebugPacket) -> None

Raise a system debug event safely

This codeEntityType is protected.

runtime_error_event_raised

runtime_error_event_raised(
    packet: RuntimeErrorPacket,
) -> None

send

send(packet: Packet) -> None

Send any message with a base type of Packet.

send_enqueued_packets

send_enqueued_packets() -> None

Send any message with a base type of Packet that has been enqueued.

send_notification

send_notification(notification: Notification) -> None

Send any notification with a base type of Notification.

Parameters:

Name Type Description Default
notification Notification

The notification to be sent.

required

set_authentication

set_authentication(job: AlgorithmNodePacket) -> None

Set the user communication channel

Parameters:

Name Type Description Default
job AlgorithmNodePacket
required

system_debug_event_raised

system_debug_event_raised(
    packet: SystemDebugPacket,
) -> None