Methods

publishMessage(exchange: string, routingKey: string, messageBody: object, throwIfFailopt: boolean)inner#

Sends message to RabbitMQ to the exchange that forwards message to marketplace

Arguments info:

  • exchange: string

    Type of the message to be sent (this will be the second part of routing key)

  • routingKey: string

    Routing key for the published message

  • messageBody: object

    Message to be sent - it is expected to be JSON serializable object or string that contain pre-serialized JSON

  • throwIfFail: boolean

    For important messages, like server-to-service communication, pass "true" for this parameter. For non-important messages, like push notification of clients, do not pass this parameter, or pass "false", so that server call won't crash, even, if message sending failed.