Interface MessageConsumer

All Known Implementing Classes:
UofSessionImpl

public interface MessageConsumer
Defines methods implemented by classes that can consume messages
  • Method Details

    • onMessageReceived

      void onMessageReceived(UnmarshalledMessage unmarshalledMessage, byte[] body, RoutingKeyInfo routingKeyInfo, MessageTimestamp timestamp)
      Consumes the provided message
      Parameters:
      unmarshalledMessage - - an unmarshalled message payload
      body - - the raw payload (mainly used for logging and user exposure)
      routingKeyInfo - - a RoutingKeyInfo instance describing the message routing key
      timestamp - - all message timestamps
    • onMessageDeserializationFailed

      void onMessageDeserializationFailed(byte[] rawMessage, Urn eventId)
      Dispatches the "unparsable message received event"
      Parameters:
      rawMessage - - the raw message payload
      eventId - - if available the related sport event id; otherwise null
    • getConsumerDescription

      String getConsumerDescription()
      Returns a String which describes the consumer
      Returns:
      - a String which describes the consumer
    • getMessageInterest

      MessageInterest getMessageInterest()
      Returns the consumer MessageInterest (method most useful in custom consumer implementations)
      Returns:
      the consumer MessageInterest
    • onRawFeedMessageReceived

      void onRawFeedMessageReceived(RoutingKeyInfo routingKey, UnmarshalledMessage feedMessage, MessageTimestamp timestamp, MessageInterest messageInterest)
      Occurs when any feed message arrives
      Parameters:
      routingKey - the routing key associated with this message
      feedMessage - the message received
      timestamp - the message timestamps
      messageInterest - the associated MessageInterest