create_incoming_msg_listener()
- 1 Minute to read
create_incoming_msg_listener()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
create_incoming_msg_listener()
Creates a listener to receive messages sent by external applications connected to the RESTful API
Reference
Arguments
Arguments | Type | |
---|---|---|
callback | Callable Object | Function or method to be called when a message is received. |
Return
None
Exceptions
Exception | Condition |
---|---|
RayaInvalidCallback | Not valid callback provided. |
See the Full List of Exceptions
Callback Arguments
Callback must receive the following arguments.
Arguments | Type | |
---|---|---|
data | dict | json compatible dictionary. |
Examples
self.communication.create_incoming_msg_listener(callback=self.incoming_msg_callback1)
....
def incoming_msg_callback1(self, msg):
self.log.info(f'Message received:')
self.log.info(f' msg: {msg}')
Was this article helpful?