/* Create sessions on top of the connection which will be used only for
receiving messages, transacted and with auto-acknowledge-mode */
s_rec1 = tc.createTopicSession(true, Session.AUTO_ACKNOWLEDGE);
s_rec2 = tc.createTopicSession(true, Session.AUTO_ACKNOWLEDGE);
/* start the connection */
tc.start();
/* Create the receivers */
TopicSubscriber ts1 = s_rec1.createSubscriber(t, "size >= 5 OR (size < 5 AND color ='green')", false);
TopicSubscriber ts2 = s_rec1.createSubscriber(t);
TopicSubscriber ts3 = s_rec2.createSubscriber(t);
/* Create a sender for sending messages */