Code example for ConcurrentLinkedQueue

import javax.jms.JMSException; 
import javax.jms.Session; 
import javax.jms.TextMessage; 
public class MultithreadedDuplicationAndLossTest extends MultiThreadedTest { 
    final ConcurrentLinkedQueue<Long> sentMessages = new ConcurrentLinkedQueue<Long>();
    final ConcurrentLinkedQueue<Long> receivedMessage = new ConcurrentLinkedQueue<Long>();
    protected TextMessage createMessage(int threadIndex, int i, Session session, int globalMsgIndex)
            throws JMSException { 
        sentMessages.add((long) globalMsgIndex);
        return session.createTextMessage(String.valueOf(globalMsgIndex));
    protected void postProcessesReceivedMessage(int threadIndex, int i, TextMessage message, int globalMsgReceivedIndex) {
        try { 
        } catch (Exception e) {
Connect your IDE to all the code out there  Get Codota for Java