Skip to main content

api.setMessageType

api.setMessageType(messageType)

Description

Sets the default message type for subsequent calls to parse and publish.

Parameters

ParameterTypeExplanation
messagetypeStringThe message_type of the message (located in headers/metadata)

Example

api.setMessageType("HelloMessageType")
api.publish("Hello world 1")
api.publish("Hello world 2")
api.publish("Hello world 3")
api.publish("Hello world 4")