Interface ChannelMessageConsumer
- All Known Implementing Classes:
ChannelMessageConsumerImpl
public interface ChannelMessageConsumer
Defines methods implemented by classes that can handle message payloads
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the channel and does the resource cleanupvoidonMessageReceived(String routingKey, byte[] body, com.rabbitmq.client.AMQP.BasicProperties properties, long receivedAt) Consumes the provided message payloadvoidopen(MessageConsumer messageConsumer) Opens the channel message consumer and prepares the required instances
-
Method Details
-
open
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 payloadbody- - the message payloadproperties- - the BasicProperties associated to the messagereceivedAt- - the time when message was received (in milliseconds since EPOCH UTC)
-
getConsumerDescription
String getConsumerDescription() -
close
Closes the channel and does the resource cleanup- Throws:
IOException
-