Package com.microsoft.windowsazure.services.servicebus.models

Examples of com.microsoft.windowsazure.services.servicebus.models.QueueInfo


    @Test
    public void receiveMessageEmptyQueueWorks() throws Exception {
        // Arrange
        String queueName = "TestReceiveMessageEmptyQueueWorks";
        service.createQueue(new QueueInfo(queueName));

        // Act
        ReceiveQueueMessageResult receiveQueueMessageResult = service
                .receiveQueueMessage(queueName, RECEIVE_AND_DELETE_5_SECONDS);
View Full Code Here


    @Test
    public void receiveQueueForwardToQueueMessageSuccess() throws Exception {
        // Arrange
        String sourceQueueName = "TestReceiveQueueForwardToQueueMessageSuccessSource";
        String destinationQueueName = "TestReceiveQueueForwardToQueueMessageSuccessDestination";
        QueueInfo destinationQueueInfo = service.createQueue(
                new QueueInfo(destinationQueueName)).getValue();
        service.createQueue(
                new QueueInfo(sourceQueueName)
                        .setForwardTo(destinationQueueInfo.getUri().toString()))
                .getValue();

        // Act
        service.sendQueueMessage(sourceQueueName, new BrokeredMessage(
                "Hello source queue!"));
View Full Code Here

    public void receiveUpdatedQueueForwardToQueueMessageSuccess()
            throws Exception {
        // Arrange
        String sourceQueueName = "TestReceiveUpdatedQueueForwardToQueueMessageSuccessSource";
        String destinationQueueName = "TestReceiveUpdatedQueueForwardToQueueMessageSuccessDestination";
        QueueInfo destinationQueueInfo = service.createQueue(
                new QueueInfo(destinationQueueName)).getValue();
        QueueInfo sourceQueueInfo = new QueueInfo(sourceQueueName);
        service.createQueue(sourceQueueInfo).getValue();
        service.updateQueue(sourceQueueInfo.setForwardTo(destinationQueueInfo
                .getUri().toString()));

        // Act
        service.sendQueueMessage(sourceQueueName, new BrokeredMessage(
                "Hello source queue!"));
View Full Code Here

        // Arrange
        String sourceTopicName = "TestReceiveSubForwardToQueueMessageSuccessSource";
        String sourceSubscriptionName = "TestReceiveSubForwardToQueueMessageSuccessSource";
        String destinationQueueName = "TestReceiveSubForwardToQueueMessageSuccessDestination";
        service.createTopic(new TopicInfo(sourceTopicName)).getValue();
        QueueInfo destinationQueueInfo = service.createQueue(
                new QueueInfo(destinationQueueName)).getValue();
        service.createSubscription(sourceTopicName, new SubscriptionInfo(
                sourceSubscriptionName).setForwardTo(destinationQueueInfo
                .getUri().toString()));

        // Act
        service.sendTopicMessage(sourceTopicName, new BrokeredMessage(
                "Hello source queue!"));
View Full Code Here

        // Arrange
        String sourceTopicName = "TestUpdatedReceiveSubForwardToQMessageSuccessSrc";
        String sourceSubscriptionName = "TestUpdatedReceiveSubForwardToQMessageSuccessSrc";
        String destinationQueueName = "TestUpdatedReceiveSubForwardToQMessageSuccessDest";
        service.createTopic(new TopicInfo(sourceTopicName)).getValue();
        QueueInfo destinationQueueInfo = service.createQueue(
                new QueueInfo(destinationQueueName)).getValue();
        SubscriptionInfo sourceSubscriptionInfo = service.createSubscription(
                sourceTopicName, new SubscriptionInfo(sourceSubscriptionName))
                .getValue();
        service.updateSubscription(sourceTopicName, sourceSubscriptionInfo
                .setForwardTo(destinationQueueInfo.getUri().toString()));
        // Act
        service.sendTopicMessage(sourceTopicName, new BrokeredMessage(
                "Hello source queue!"));
        ReceiveQueueMessageResult receiveQueueMessageResult = service
                .receiveQueueMessage(destinationQueueName,
View Full Code Here

        String destinationTopicName = "TestReceiveQueueForwardToTopicMessageSuccessDestination";
        String destinationSubscriptionName = "TestReceiveQueueForwardToTopicMessageSuccessDestination";
        TopicInfo destinationTopicInfo = service.createTopic(
                new TopicInfo(destinationTopicName)).getValue();
        service.createQueue(
                new QueueInfo(sourceQueueName)
                        .setForwardTo(destinationTopicInfo.getUri().toString()))
                .getValue();

        // Act
        service.sendQueueMessage(sourceQueueName, new BrokeredMessage(
View Full Code Here

        String sourceQueueName = "TestReceiveUpdatedQueueForwardToTopicMessageSuccessSource";
        String destinationTopicName = "TestReceiveUpdatedQueueForwardToTopicMessageSuccessDestination";
        String destinationSubscriptionName = "TestReceiveUpdatedQueueForwardToTopicMessageSuccessDestination";
        TopicInfo destinationTopicInfo = service.createTopic(
                new TopicInfo(destinationTopicName)).getValue();
        QueueInfo sourceQueueInfo = new QueueInfo(sourceQueueName);
        service.createQueue(sourceQueueInfo).getValue();
        service.updateQueue(sourceQueueInfo.setForwardTo(destinationTopicInfo
                .getUri().toString()));

        // Act
        service.sendQueueMessage(sourceQueueName, new BrokeredMessage(
                "Hello source queue!"));
View Full Code Here

    @Test
    public void peekLockMessageWorks() throws Exception {
        // Arrange
        String queueName = "TestPeekLockMessageWorks";
        service.createQueue(new QueueInfo(queueName));
        service.sendQueueMessage(queueName, new BrokeredMessage("Hello Again"));

        // Act
        BrokeredMessage message = service.receiveQueueMessage(queueName,
                PEEK_LOCK_5_SECONDS).getValue();
View Full Code Here

    @Test
    public void peekLockMessageEmptyQueueWorks() throws Exception {
        // Arrange
        String queueName = "TestPeekLockMessageEmptyQueueWorks";
        service.createQueue(new QueueInfo(queueName));

        // Act
        ReceiveQueueMessageResult result = service.receiveQueueMessage(
                queueName, PEEK_LOCK_5_SECONDS);
View Full Code Here

    @Test
    public void peekLockedMessageCanBeCompleted() throws Exception {
        // Arrange
        String queueName = "TestPeekLockedMessageCanBeCompleted";
        service.createQueue(new QueueInfo(queueName));
        service.sendQueueMessage(queueName, new BrokeredMessage("Hello Again"));
        BrokeredMessage message = service.receiveQueueMessage(queueName,
                PEEK_LOCK_5_SECONDS).getValue();

        // Act
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.services.servicebus.models.QueueInfo

Copyright © 2018 www.massapicom. 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.