public class ChannelMessageConsumerImpl extends Object implements ChannelMessageConsumer
ChannelMessageConsumer interface| Constructor and Description |
|---|
ChannelMessageConsumerImpl(RoutingKeyParser routingKeyParser,
SdkInternalConfiguration configuration,
SdkProducerManager producerManager,
JAXBContext messageJaxbContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the channel and does the resource cleanup
|
String |
getConsumerDescription() |
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
|
@Inject public ChannelMessageConsumerImpl(RoutingKeyParser routingKeyParser, SdkInternalConfiguration configuration, SdkProducerManager producerManager, JAXBContext messageJaxbContext)
routingKeyParser - a RoutingKeyParser used to parse the rabbit's routing keyconfiguration - the associated feed configurationproducerManager - the producer managerpublic void open(MessageConsumer messageConsumer)
open in interface ChannelMessageConsumermessageConsumer - the parsed/prepared messagespublic void onMessageReceived(String routingKey, byte[] body, com.rabbitmq.client.AMQP.BasicProperties properties, long receivedAt)
onMessageReceived in interface ChannelMessageConsumerroutingKey - - 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)public String getConsumerDescription()
getConsumerDescription in interface ChannelMessageConsumerpublic void close()
throws IOException
ChannelMessageConsumerclose in interface ChannelMessageConsumerIOExceptionCopyright © 2016–2025. All rights reserved.