use of org.apache.qpid.jms.JmsConnection in project activemq-artemis by apache.
the class JMSWebSocketConnectionTest method testSendLargeMessageToClientFromAMQP.
@Ignore("Broker can't accept messages over 65535 right now")
@Test(timeout = 30000)
public void testSendLargeMessageToClientFromAMQP() throws Exception {
JmsConnectionFactory factory = new JmsConnectionFactory(getBrokerQpidJMSConnectionURI());
JmsConnection connection = (JmsConnection) factory.createConnection();
sendLargeMessageViaAMQP();
try {
Session session = connection.createSession();
Queue queue = session.createQueue(getQueueName());
connection.start();
MessageConsumer consumer = session.createConsumer(queue);
Message message = consumer.receive(1000);
assertNotNull(message);
assertTrue(message instanceof BytesMessage);
} finally {
connection.close();
}
}
use of org.apache.qpid.jms.JmsConnection in project activemq-artemis by apache.
the class JMSWebSocketConnectionTest method testSendReceiveOverWS.
@Test(timeout = 30000)
public void testSendReceiveOverWS() throws Exception {
JmsConnectionFactory factory = new JmsConnectionFactory(getBrokerQpidJMSConnectionURI());
JmsConnection connection = (JmsConnection) factory.createConnection();
try {
Session session = connection.createSession();
Queue queue = session.createQueue(getQueueName());
MessageProducer producer = session.createProducer(queue);
producer.send(session.createMessage());
producer.close();
connection.start();
MessageConsumer consumer = session.createConsumer(queue);
Message message = consumer.receive(1000);
assertNotNull(message);
} finally {
connection.close();
}
}
Aggregations