@@ -0,0 +1,1256 @@
+package quantisan.qte_lmax;%0A%0Aimport com.rabbitmq.client.Channel;%0Aimport com.rabbitmq.client.QueueingConsumer;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport java.io.IOException;%0A%0Apublic class Order implements Runnable %7B%0A    final static Logger logger = LoggerFactory.getLogger(Order.class);%0A    private final Channel channel;%0A    private final QueueingConsumer consumer;%0A%0A    public Order (Channel channel, QueueingConsumer consumer) %7B%0A        this.channel = channel;%0A        this.consumer = consumer;%0A    %7D%0A%0A    @Override%0A    public void run() %7B%0A        while (!Thread.currentThread().isInterrupted()) %7B%0A            QueueingConsumer.Delivery delivery = null;%0A            try %7B%0A                delivery = consumer.nextDelivery();%0A            %7D catch (InterruptedException e) %7B%0A                logger.error(%22Interrupted before order delivery.%22, e);%0A            %7D%0A            String message = new String(delivery.getBody());%0A            logger.info(%22Received '%7B%7D'%22, message);  // TODO process order%0A            try %7B%0A                channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);%0A            %7D catch (IOException e) %7B%0A                logger.error(%22Fail to acknowledge order message.%22, e);%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

order class to process orders