// Create a connection and start it
TopicConnection connection = (TopicConnection) getConnection();
connection.start();
// Send messages which don't match and do match the selector, checking message count
TopicSession pubSession = connection.createTopicSession(true, Session.SESSION_TRANSACTED);
Topic topic = pubSession.createTopic(SELECTOR_TOPIC_NAME);
TopicPublisher publisher = pubSession.createPublisher(topic);
publishMessages(pubSession, publisher, topic, DeliveryMode.PERSISTENT, 1*1024, 1, "false");
pubSession.commit();