Package org.fusesource.stomp.client

Examples of org.fusesource.stomp.client.Stomp.connectBlocking()


public class StompProducerTest extends StompBaseTest {

    @Test
    public void testProduce() throws Exception {
        Stomp stomp = new Stomp("tcp://localhost:" + getPort());
        final BlockingConnection subscribeConnection = stomp.connectBlocking();

        StompFrame frame = new StompFrame(SUBSCRIBE);
        frame.addHeader(DESTINATION, StompFrame.encodeHeader("/queue/test"));
        frame.addHeader(ID, subscribeConnection.nextId());
        StompFrame response = subscribeConnection.request(frame);
View Full Code Here


public class StompConsumerTest extends StompBaseTest {

    @Test
    public void testConsume() throws Exception {
        Stomp stomp = new Stomp("tcp://localhost:" + getPort());
        final BlockingConnection producerConnection = stomp.connectBlocking();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMinimumMessageCount(numberOfMessages);

        for (int i = 0; i < numberOfMessages; i++) {
View Full Code Here

public class StompConsumerUriTest extends StompBaseTest {

    @Test
    public void testConsume() throws Exception {
        Stomp stomp = new Stomp("tcp://localhost:" + getPort());
        final BlockingConnection producerConnection = stomp.connectBlocking();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMinimumMessageCount(numberOfMessages);

        for (int i = 0; i < numberOfMessages; i++) {
View Full Code Here

        context.addRoutes(createRouteBuilder());
        context.start();

        Stomp stomp = new Stomp("tcp://localhost:" + getPort());
        final BlockingConnection subscribeConnection = stomp.connectBlocking();

        StompFrame frame = new StompFrame(SUBSCRIBE);
        frame.addHeader(DESTINATION, StompFrame.encodeHeader("/queue/test"));
        frame.addHeader(ID, subscribeConnection.nextId());
        StompFrame response = subscribeConnection.request(frame);
View Full Code Here

        context.addRoutes(createRouteBuilder());
        context.start();

        Stomp stomp = new Stomp("tcp://localhost:" + getPort());
        final BlockingConnection producerConnection = stomp.connectBlocking();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMinimumMessageCount(numberOfMessages);

        for (int i = 0; i < numberOfMessages; i++) {
View Full Code Here

        context.addRoutes(createRouteBuilder());
        context.start();

        Stomp stomp = new Stomp("tcp://localhost:" + getPort());
        final BlockingConnection producerConnection = stomp.connectBlocking();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMinimumMessageCount(numberOfMessages);

        for (int i = 0; i < numberOfMessages; i++) {
View Full Code Here

        DetectingGateway gateway = createGateway();

        // Lets establish a connection....
        Stomp stomp = new Stomp("localhost", gateway.getBoundPort());
        stomp.setHost("broker0"); // lets connect to the broker0 virtual host..
        org.fusesource.stomp.client.BlockingConnection connection = stomp.connectBlocking();

        assertConnectedToBroker(0);
        connection.close();
    }
View Full Code Here

public class StompProducerTest extends StompBaseTest {

    @Test
    public void testProduce() throws Exception {
        Stomp stomp = new Stomp("tcp://localhost:61613");
        final BlockingConnection subscribeConnection = stomp.connectBlocking();

        StompFrame frame = new StompFrame(SUBSCRIBE);
        frame.addHeader(DESTINATION, StompFrame.encodeHeader("/queue/test"));
        frame.addHeader(ID, subscribeConnection.nextId());
        StompFrame response = subscribeConnection.request(frame);
View Full Code Here

public class StompConsumerTest extends StompBaseTest {

    @Test
    public void testConsume() throws Exception {
        Stomp stomp = new Stomp("tcp://localhost:61613");
        final BlockingConnection producerConnection = stomp.connectBlocking();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMinimumMessageCount(numberOfMessages);

        for (int i = 0; i < numberOfMessages; i++) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.