Skip to content

StreamingMessageHandler

QuantConnect.Messaging.StreamingMessageHandler

Bases: Object, IMessagingHandler

Message handler that sends messages over tcp using NetMQ.

has_subscribers

has_subscribers: bool

Gets or sets whether this messaging handler has any current subscribers. This is not used in this message handler. Messages are sent via tcp as they arrive

dispose

dispose() -> None

Dispose any resources used before destruction

initialize

initialize(
    initialize_parameters: MessagingHandlerInitializeParameters,
) -> None

Initialize the messaging system

Parameters:

Name Type Description Default
initialize_parameters MessagingHandlerInitializeParameters

The parameters required for initialization

required

send

send(packet: Packet) -> None

Send all types of packets

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

transmit

transmit(packet: Packet) -> None

Send a message to the _server using ZeroMQ

Parameters:

Name Type Description Default
packet Packet

Packet to transmit

required