Channel Message

The ChannelMessageEvent is used to monitor internal channel messages in the Cloud. You can send and receive channel messages to services through the API and process them there.

Methods

  1. getServiceIdFrom() Returns the service ID from which the message originates.

  2. getServiceIdTo() Returns the service ID to which the message should be sent.

  3. getChannel() Returns the channel that was specified during the sending.

  4. getMessage() Returns the message that was sent.

Code example

@Eventable
public void handle(ChannelMessageEvent event) {
    var channel = event.getChannel();
    var message = event.getMessage();
    System.out.printf("Message received: Channel %s and message %s%n", channel, message);
}

Last updated