Interface ChannelMessageConsumer

All Known Implementing Classes:
ChannelMessageConsumerImpl

public interface ChannelMessageConsumer
Defines methods implemented by classes that can handle message payloads
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the channel and does the resource cleanup
     
    void
    onMessageReceived(String routingKey, byte[] body, com.rabbitmq.client.AMQP.BasicProperties properties, long receivedAt)
    Consumes the provided message payload
    void
    open(MessageConsumer messageConsumer)
    Opens the channel message consumer and prepares the required instances
  • Method Details

    • open

      void open(MessageConsumer messageConsumer)
      Opens the channel message consumer and prepares the required instances
      Parameters:
      messageConsumer - the parsed/prepared messages
    • onMessageReceived

      void onMessageReceived(String routingKey, byte[] body, com.rabbitmq.client.AMQP.BasicProperties properties, long receivedAt)
      Consumes the provided message payload
      Parameters:
      routingKey - - the source routing key of the payload
      body - - the message payload
      properties - - the BasicProperties associated to the message
      receivedAt - - the time when message was received (in milliseconds since EPOCH UTC)
    • getConsumerDescription

      String getConsumerDescription()
    • close

      void close() throws IOException
      Closes the channel and does the resource cleanup
      Throws:
      IOException