moved the PojoHandler class into the spring-rabbit-admin project since that's where it's used
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
package org.springframework.amqp.rabbit.core;
|
||||
package org.springframework.amqp.rabbit.admin;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
public class PojoHandler {
|
||||
|
||||
private final AtomicInteger messageCount = new AtomicInteger();
|
||||
|
||||
|
||||
public void handleMessage(String textMessage) {
|
||||
int msgCount = this.messageCount.incrementAndGet();
|
||||
System.out.println("Thread [" + Thread.currentThread().getId() + "] PojoHandler Received Message " + msgCount + ", = " + textMessage);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.springframework.amqp.rabbit.admin;
|
||||
|
||||
import org.springframework.amqp.rabbit.core.PojoHandler;
|
||||
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
|
||||
import org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -15,11 +14,10 @@ public class RabbitConsumerConfiguration extends TestRabbitConfiguration {
|
||||
container.setConnectionFactory(connectionFactory());
|
||||
container.setQueueName(TestConstants.QUEUE_NAME);
|
||||
container.setConcurrentConsumers(5);
|
||||
|
||||
MessageListenerAdapter adapter = new MessageListenerAdapter();
|
||||
adapter.setDelegate(new PojoHandler());
|
||||
container.setMessageListener(adapter);
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user