I have a Java process that uses ActimeMQ, the queued messages are processed by Java and sent to a socket. The problem is that activeMQ processes several messages asynchronously at the same time, and sends them to the socket, causing the message to be received in a different order than the one sent when listening to the socket. It is possible to force ActiveMQ to keep messages in the queue if it still maintains a message that has not been "dequeued", this with the intention that only one message is processed at a time in the socket, in the order that they are received.