public class FanoutExchangeConsumer extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
private com.rabbitmq.client.Channel |
channel |
| Constructor and Description |
|---|
FanoutExchangeConsumer(org.hobbit.core.rabbit.RabbitQueueFactory queueFactory,
String exchangeName)
Initializes consuming of messages coming through specified exchange.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
handle(byte[] body)
Abstract method which is called when a message is received.
|
public FanoutExchangeConsumer(org.hobbit.core.rabbit.RabbitQueueFactory queueFactory,
String exchangeName)
throws IOException
queueFactory - factory to create queues withexchangeName - name of the exchangeIOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic void handle(byte[] body)
body - message body as a byte arrayCopyright © 2019–2020. All rights reserved.