blpapi.test.MessageProperties

class blpapi.test.MessageProperties

This class represents properties of a message that are not part of the message contents, such as the correlation ids or timestamp.

__init__()

Create ‘MessageProperties’ with default values.

Default value for the ‘CorrelationId’ property is an empty list. Default value for the ‘recapType’ property is ‘Message.RECAPTYPE_NONE’. Default value for the ‘fragmentType’ property is ‘Message.FRAGMENT_NONE’. Default value for the ‘Service’ and ‘timeReceived’ is “unset”.

destroy()

Destroy this MessageProperties.

setCorrelationIds(cids)

Set the correlationIds properties of the message.

Parameters

cids ([CorrelationId]) – list of correlation ids of the message.

setRecapType(recapType, fragmentType=0)

Set the recapType and fragmentType properties of the message.

Parameters
  • recapType (int) – Recap type of the message. See blpapi.Message for valid values.

  • fragmentType (int) – Optional. Fragment type of the message. See blpapi.Message for valid values. The default value is blpapi.Message.FRAGMENT_NONE.

setRequestId(requestId)

Set the requestId property. A copy of this string is expected to be returned by blpapi.Message.getRequestId(). If requestId is empty or None, the method throws.

Parameters

requestId (str) – RequestId of the message.

setService(service)

Set the service property of the message.

Parameters

service (Service) – Service of the message.

setTimeReceived(timestamp)

Set the timeReceived property of the message.

Parameters

timestamp (datetime.datetime) – Timestamp of the message.