connection.setUseCompression(compressed);
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Topic destination = session.createTopic(destinationName);
MessageProducer producer = session.createProducer(destination);
StreamMessage message = session.createStreamMessage();
message.writeString(builder.toString());
producer.send(message);
}
private void sendMapMessage(boolean compressed) throws Exception {
sendMapMessage(tcpConnectionFactory, compressed);