Package com.rabbitmq.client

Examples of com.rabbitmq.client.Channel.basicCancel()


        try {
            String classname = subscriber.getClass().getName();
            String queueName = UUID.nameUUIDFromBytes(classname.getBytes()).toString();
            Ternary<String, Channel, EventSubscriber> queueDetails = s_subscribers.get(queueName);
            Channel channel = queueDetails.second();
            channel.basicCancel(queueName);
            s_subscribers.remove(queueName, queueDetails);
        } catch (Exception e) {
            throw new EventBusException("Failed to unsubscribe from event bus due to " + e.getMessage());
        }
    }
View Full Code Here


        boolean succeeded = false;
        final String consumer = (String) parameters[0];
        final Channel channel = AmqpOperationFactory.this.amqpDriver.getChannel (consumer);
        if (channel != null) {
          try {
            channel.basicCancel (consumer);
            succeeded = true;
          } catch (final IOException e) {
            AmqpOperationFactory.this.exceptions.traceIgnoredException (e);
          }
        }
View Full Code Here

    assertSame(con, same);
    channel.close();

    when(mockConnection1.isOpen()).thenReturn(false);
    when(mockChannel.isOpen()).thenReturn(false); // force a connection refresh
    channel.basicCancel("foo");
    channel.close();

    Connection notSame = connectionFactory.createConnection();
    assertNotSame(con, notSame);
    assertSame(con, closed.get());
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.