com.rabbitmq.client.DeliverCallback Java Examples

The following examples show how to use com.rabbitmq.client.DeliverCallback. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProducerExchangeConsumer_Direct.java    From util4j with Apache License 2.0 6 votes vote down vote up
public void consumer2() throws Exception {
	//1、获取连接
       Connection connection =RabbitMqConnectionFactoy.getConnection();
       //2、声明通道
       Channel channel = connection.createChannel();
       //3、声明队列
       channel.queueDeclare(QUEUE_NAME2, false, false, false, null);
       //绑定队列到交换机
       channel.queueBind(QUEUE_NAME2, EXCHANGE_NAME,ROUTER_KEY_2);
       channel.queueBind(QUEUE_NAME2, EXCHANGE_NAME,ROUTER_KEY_22);
       //同一时刻服务器只会发送一条消息给消费者(如果设置为N,则当客户端堆积N条消息后服务端不会推送给客户端了)
       //channel.basicQos(1);//每次只从服务器取1个处理
       //4、定义队列的消费者
       DeliverCallback deliverCallback = (consumerTag, delivery) -> {
           String message = new String(delivery.getBody(), "UTF-8");
           System.out.println("-->消费者2号,收到消息,msg :"+message+",header:"+delivery.getProperties().getHeaders().toString());
           channel.basicAck( delivery.getEnvelope().getDeliveryTag(), false);
       };
       channel.basicConsume(QUEUE_NAME2, autoAck, deliverCallback, consumerTag -> { });
}
 
Example #2
Source File: ProducerExchangeConsumer_Direct.java    From util4j with Apache License 2.0 6 votes vote down vote up
/**
    * 消费者3的队列的key和队列1的key相等
    * @throws Exception
    */
   public void consumer3() throws Exception {
	//1、获取连接
       Connection connection =RabbitMqConnectionFactoy.getConnection();
       //2、声明通道
       Channel channel = connection.createChannel();
       //3、声明队列
       channel.queueDeclare(QUEUE_NAME3, false, false, false, null);
       //绑定队列到交换机
       channel.queueBind(QUEUE_NAME3, EXCHANGE_NAME,ROUTER_KEY_1);
       //同一时刻服务器只会发送一条消息给消费者(如果设置为N,则当客户端堆积N条消息后服务端不会推送给客户端了)
       //channel.basicQos(1);//每次只从服务器取1个处理
       //4、定义队列的消费者
       DeliverCallback deliverCallback = (consumerTag, delivery) -> {
           String message = new String(delivery.getBody(), "UTF-8");
           System.out.println("-->消费者3号,收到消息,msg :"+message+",header:"+delivery.getProperties().getHeaders().toString());
           channel.basicAck( delivery.getEnvelope().getDeliveryTag(), false);
       };
       channel.basicConsume(QUEUE_NAME3, autoAck, deliverCallback, consumerTag -> { });
}
 
Example #3
Source File: ProducerExchangeConsumer_Fanout.java    From util4j with Apache License 2.0 6 votes vote down vote up
public void consumer2() throws Exception {
	//1、获取连接
       Connection connection =RabbitMqConnectionFactoy.getConnection();
       //2、声明通道
       Channel channel = connection.createChannel();
       //3、声明队列
       channel.queueDeclare(QUEUE_NAME2, false, false, false, null);
       //绑定队列到交换机
       channel.queueBind(QUEUE_NAME2, EXCHANGE_NAME,"");
       //同一时刻服务器只会发送一条消息给消费者(如果设置为N,则当客户端堆积N条消息后服务端不会推送给客户端了)
       //channel.basicQos(1);//每次只从服务器取1个处理
       //4、定义队列的消费者
       DeliverCallback deliverCallback = (consumerTag, delivery) -> {
           String message = new String(delivery.getBody(), "UTF-8");
           System.out.println("-->消费者2号,收到消息,msg :"+message+",header:"+delivery.getProperties().getHeaders().toString());
           channel.basicAck( delivery.getEnvelope().getDeliveryTag(), false);
       };
       channel.basicConsume(QUEUE_NAME2, autoAck, deliverCallback, consumerTag -> { });
}
 
Example #4
Source File: ProducerConsumer.java    From util4j with Apache License 2.0 6 votes vote down vote up
public void consumer2() throws Exception {
	//1、获取连接
       Connection connection =RabbitMqConnectionFactoy.getConnection();
       //2、声明通道
       Channel channel = connection.createChannel();
       //3、声明队列
       channel.queueDeclare(QUEUE_NAME, false, false, false, null);
       //同一时刻服务器只会发送一条消息给消费者(如果设置为N,则当客户端堆积N条消息后服务端不会推送给客户端了)
       channel.basicQos(1);//每次只从服务器取1个处理
       //4、定义队列的消费者
       DeliverCallback deliverCallback = (consumerTag, delivery) -> {
           String message = new String(delivery.getBody(), "UTF-8");
           System.out.println("-->消费者2号,收到消息,msg :"+message+",header:"+delivery.getProperties().getHeaders().toString());
           channel.basicAck( delivery.getEnvelope().getDeliveryTag(), false);
       };
       channel.basicConsume(QUEUE_NAME, autoAck, deliverCallback, consumerTag -> { });
}
 
Example #5
Source File: ProducerConsumer.java    From util4j with Apache License 2.0 6 votes vote down vote up
public void consumer3() throws Exception {
	//1、获取连接
       Connection connection =RabbitMqConnectionFactoy.getConnection();
       //2、声明通道
       Channel channel = connection.createChannel();
       //3、声明队列
       channel.queueDeclare(QUEUE_NAME, false, false, false, null);
       //同一时刻服务器只会发送一条消息给消费者(如果设置为N,则当客户端堆积N条消息后服务端不会推送给客户端了)
       channel.basicQos(1);//每次只从服务器取1个处理
       //4、定义队列的消费者
       DeliverCallback deliverCallback = (consumerTag, delivery) -> {
           String message = new String(delivery.getBody(), "UTF-8");
           System.out.println("-->消费者3号,收到消息,msg :"+message+",header:"+delivery.getProperties().getHeaders().toString());
           channel.basicAck( delivery.getEnvelope().getDeliveryTag(), false);
       };
       channel.basicConsume(QUEUE_NAME, autoAck, deliverCallback, consumerTag -> { });
}
 
Example #6
Source File: ProducerExchangeConsumer_Topic.java    From util4j with Apache License 2.0 6 votes vote down vote up
public void consumer2() throws Exception {
	//1、获取连接
       Connection connection =RabbitMqConnectionFactoy.getConnection();
       //2、声明通道
       Channel channel = connection.createChannel();
       //3、声明队列
       channel.queueDeclare(QUEUE_NAME2, false, false, false, null);
       //绑定队列到交换机
       channel.queueBind(QUEUE_NAME2, EXCHANGE_NAME,"test.#");//基数偶数都接收
       //同一时刻服务器只会发送一条消息给消费者(如果设置为N,则当客户端堆积N条消息后服务端不会推送给客户端了)
       //channel.basicQos(1);//每次只从服务器取1个处理
       //4、定义队列的消费者
       DeliverCallback deliverCallback = (consumerTag, delivery) -> {
           String message = new String(delivery.getBody(), "UTF-8");
           System.out.println("-->消费者2号,收到消息,msg :"+message+",header:"+delivery.getProperties().getHeaders().toString());
           channel.basicAck( delivery.getEnvelope().getDeliveryTag(), false);
       };
       channel.basicConsume(QUEUE_NAME2, autoAck, deliverCallback, consumerTag -> { });
}
 
Example #7
Source File: ProducerExchangeConsumer_Topic.java    From util4j with Apache License 2.0 6 votes vote down vote up
public void consumer3() throws Exception {
	//1、获取连接
       Connection connection =RabbitMqConnectionFactoy.getConnection();
       //2、声明通道
       Channel channel = connection.createChannel();
       //3、声明队列
       channel.queueDeclare(QUEUE_NAME3, false, false, false, null);
       //绑定队列到交换机
       channel.queueBind(QUEUE_NAME3, EXCHANGE_NAME,"test.#");//基数偶数都接收
       //同一时刻服务器只会发送一条消息给消费者(如果设置为N,则当客户端堆积N条消息后服务端不会推送给客户端了)
       //channel.basicQos(1);//每次只从服务器取1个处理
       //4、定义队列的消费者
       DeliverCallback deliverCallback = (consumerTag, delivery) -> {
           String message = new String(delivery.getBody(), "UTF-8");
           System.out.println("-->消费者3号,收到消息,msg :"+message+",header:"+delivery.getProperties().getHeaders().toString());
           channel.basicAck( delivery.getEnvelope().getDeliveryTag(), false);
       };
       channel.basicConsume(QUEUE_NAME3, autoAck, deliverCallback, consumerTag -> { });
}
 
Example #8
Source File: DifferPublisher.java    From EDDI with Apache License 2.0 6 votes vote down vote up
@Override
public void init(DeliverCallback conversationCreatedCallback, DeliverCallback messageCreatedCallback) {
    try {
        channel = channelProvider.get();

        channel.exchangeDeclare(EDDI_EXCHANGE, BuiltinExchangeType.TOPIC, true, false, null);

        channel.queueDeclare(CONVERSATION_CREATED_QUEUE_NAME, true, false, false, null);
        channel.queueBind(CONVERSATION_CREATED_QUEUE_NAME, CONVERSATION_CREATED_EXCHANGE, "");
        channel.basicConsume(CONVERSATION_CREATED_QUEUE_NAME, false, conversationCreatedCallback, cancelCallback);

        channel.queueDeclare(MESSAGE_CREATED_QUEUE_NAME, true, false, false, null);
        channel.queueBind(MESSAGE_CREATED_QUEUE_NAME, MESSAGE_CREATED_EXCHANGE, "");
        channel.basicConsume(MESSAGE_CREATED_QUEUE_NAME, false, messageCreatedCallback, cancelCallback);

        channel.queueDeclare(MESSAGE_CREATED_EDDI_FAILED_ROUTING_KEY, true, false, false, null);
        channel.queueBind(MESSAGE_CREATED_EDDI_FAILED_ROUTING_KEY, EDDI_EXCHANGE, "");

        channel.confirmSelect();

    } catch (IOException e) {
        log.error(e.getLocalizedMessage(), e);
    }
}
 
Example #9
Source File: ConsumerHolderTest.java    From rabbitmq-cdi with MIT License 6 votes vote down vote up
@Test
void activateAndDeactivate() throws IOException, TimeoutException {
  sut = new ConsumerHolder(eventConsumerMock, "queue", false, PREFETCH_COUNT,
      consumerChannelFactoryMock, declarationsListMock, declarerRepositoryMock);
  Assertions.assertEquals("queue", sut.getQueueName());
  Assertions.assertFalse(sut.isAutoAck());
  when(consumerChannelFactoryMock.createChannel()).thenReturn(channelMock);
  sut.activate();
  verify(channelMock).addRecoveryListener(sut);
  verify(declarerRepositoryMock).declare(channelMock, declarationsListMock);
  verify(channelMock, never()).close();
  verify(channelMock).basicConsume(eq("queue"), eq(false), isA(DeliverCallback.class),
      isA(ConsumerShutdownSignalCallback.class));
  sut.deactivate();
  verify(channelMock).close();
}
 
Example #10
Source File: ConsumerHolderTest.java    From rabbitmq-cdi with MIT License 6 votes vote down vote up
@Test
void activateAndDeactivateWithAutoAck() throws IOException, TimeoutException {
  sut = new ConsumerHolder(eventConsumerMock, "queue", true, PREFETCH_COUNT,
      consumerChannelFactoryMock, declarationsListMock, declarerRepositoryMock);
  Assertions.assertEquals("queue", sut.getQueueName());
  Assertions.assertTrue(sut.isAutoAck());
  when(consumerChannelFactoryMock.createChannel()).thenReturn(channelMock);
  sut.activate();
  verify(channelMock).addRecoveryListener(sut);
  verify(channelMock).basicConsume(eq("queue"), eq(true), isA(DeliverCallback.class),
      isA(ConsumerShutdownSignalCallback.class));
  verify(declarerRepositoryMock).declare(channelMock, declarationsListMock);
  verify(channelMock, never()).close();
  verify(channelMock).basicQos(PREFETCH_COUNT);

  sut.deactivate();
  verify(channelMock).close();
}
 
Example #11
Source File: ConsumerHolderTest.java    From rabbitmq-cdi with MIT License 5 votes vote down vote up
@Test
void errorDuringActivate() {
  Assertions.assertThrows(IOException.class, () -> {
    sut = new ConsumerHolder(eventConsumerMock, "queue", true, 0, consumerChannelFactoryMock,
        declarationsListMock, declarerRepositoryMock);
    when(consumerChannelFactoryMock.createChannel()).thenReturn(channelMock);
    doThrow(new IOException()).when(channelMock).basicConsume(eq("queue"), eq(true),
        isA(DeliverCallback.class), isA(ConsumerShutdownSignalCallback.class));
    sut.activate();
    verify(channelMock).addRecoveryListener(sut);
    verify(declarerRepositoryMock).declare(channelMock, declarationsListMock);
    verify(channelMock).close();
  });
}
 
Example #12
Source File: RabbitMQTest.java    From james-project with Apache License 2.0 5 votes vote down vote up
@Test
void rabbitMQShouldSupportTheExclusiveWorkQueueCase() throws Exception {
    channel1.exchangeDeclare(EXCHANGE_NAME, "direct", DURABLE);
    channel1.queueDeclare(WORK_QUEUE, DURABLE, !EXCLUSIVE, !AUTO_DELETE, ImmutableMap.of());
    channel1.queueBind(WORK_QUEUE, EXCHANGE_NAME, ROUTING_KEY);

    IntStream.range(0, 10)
            .mapToObj(String::valueOf)
            .map(RabbitMQTest.this::asBytes)
            .forEach(Throwing.<byte[]>consumer(
                    bytes -> channel1.basicPublish(EXCHANGE_NAME, ROUTING_KEY, NO_PROPERTIES, bytes)).sneakyThrow());

    String dyingConsumerTag = "dyingConsumer";
    ImmutableMap<String, Object> arguments = ImmutableMap.of();
    ConcurrentLinkedQueue<Integer> receivedMessages = new ConcurrentLinkedQueue<>();
    CancelCallback doNothingOnCancel = consumerTag -> { };
    DeliverCallback ackFirstMessageOnly = (consumerTag, message) -> {
        if (receivedMessages.size() == 0) {
            receivedMessages.add(Integer.valueOf(new String(message.getBody(), StandardCharsets.UTF_8)));
            channel2.basicAck(message.getEnvelope().getDeliveryTag(), !MULTIPLE);
        } else {
            channel2.basicNack(message.getEnvelope().getDeliveryTag(), !MULTIPLE, REQUEUE);
        }
    };
    channel2.basicConsume(WORK_QUEUE, !AUTO_ACK, dyingConsumerTag, !NO_LOCAL, EXCLUSIVE, arguments, ackFirstMessageOnly, doNothingOnCancel);

    awaitAtMostOneMinute.until(() -> receivedMessages.size() == 1);

    channel2.basicCancel(dyingConsumerTag);

    InMemoryConsumer fallbackConsumer = new InMemoryConsumer(channel3);
    channel3.basicConsume(WORK_QUEUE, AUTO_ACK, "fallbackConsumer", !NO_LOCAL, EXCLUSIVE, arguments, fallbackConsumer);

    awaitAtMostOneMinute.until(() -> countReceivedMessages(fallbackConsumer) >= 1);

    assertThat(receivedMessages).containsExactly(0);
    assertThat(fallbackConsumer.getConsumedMessages()).contains(1, 2).doesNotContain(0);
}
 
Example #13
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, DeliverCallback deliverCallback, CancelCallback cancelCallback) throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}
 
Example #14
Source File: RestDifferEndpoint.java    From EDDI with Apache License 2.0 4 votes vote down vote up
private DeliverCallback conversationCreatedCallback() {
    return (consumerTag, delivery) -> {
        final long deliveryTag = delivery.getEnvelope().getDeliveryTag();
        String receivedMessage = new String(delivery.getBody(), StandardCharsets.UTF_8);
        log.trace("Received Raw Conversation Created Message: {}", receivedMessage);

        try {
            var conversationCreatedEvent = jsonSerialization.deserialize(receivedMessage, ConversationCreatedEvent.class);

            if (conversationCreatedEvent.getPayload().getError() != null) {
                log.error("ConversationCreated event contained error '{}'", receivedMessage);
                differPublisher.positiveDeliveryAck(deliveryTag);
                return;
            }

            var payload = conversationCreatedEvent.getPayload();
            var conversationId = payload.getConversation().getId();
            var participantIds = payload.getParticipantIds();
            // in case there are multiple bots part of the conversation, we need to send this data to all of them
            var botUserParticipantIds = filterBotUserParticipantIds(participantIds);

            if (botUserParticipantIds.isEmpty()) {
                //No bot involved in this conversation
                log.debug(logStatementIgnoredEvent, receivedMessage);
                differPublisher.positiveDeliveryAck(deliveryTag);
                return;
            }

            log.info(" [x] Received and accepted amqp event: {}", receivedMessage);

            var conversationInfo = createDifferConversation(conversationId, participantIds, botUserParticipantIds);
            log.debug("Differ Conversation created. {}", conversationInfo);

            botUserParticipantIds.forEach(botUserId ->
                    startConversationWithUser(delivery, botUserId, conversationId, conversationCreatedEvent, conversationInfo));
        } catch (Exception e) {
            log.error("Error processing delivery {} of conversation.created.eddi with body {}", deliveryTag, receivedMessage);
            log.error(e.getLocalizedMessage(), e);
            differPublisher.negativeDeliveryAck(delivery);
        }
    };
}
 
Example #15
Source File: RestDifferEndpoint.java    From EDDI with Apache License 2.0 4 votes vote down vote up
private DeliverCallback messageCreatedCallback() {
    return (consumerTag, delivery) -> {
        final long deliveryTag = delivery.getEnvelope().getDeliveryTag();
        String receivedMessage = new String(delivery.getBody(), StandardCharsets.UTF_8);
        log.trace("Received Raw Message Created Message: {}", receivedMessage);

        try {
            var messageCreatedEvent = jsonSerialization.deserialize(receivedMessage, MessageCreatedEvent.class);
            final var conversationId = messageCreatedEvent.getPayload().getConversation().getId();
            if (!availableConversationIds.containsKey(conversationId)) {
                log.debug("Ignored message because " +
                        "conversationId is not part of any known conversations " +
                        "(conversationId={}).", conversationId);
                differPublisher.positiveDeliveryAck(deliveryTag);
                return;
            }

            //we have confirmed that we are part of this conversation
            // next step: see if there are any bot messages waiting for this message to arrive to be send out
            var messageSentAtTime = messageCreatedEvent.getCreatedAt().getTime();
            var message = messageCreatedEvent.getPayload().getMessage();
            if (message == null) {
                log.error("Received a conversation.created event in the message.created queue. {}", receivedMessage);
                differPublisher.negativeDeliveryAck(delivery);
                return;
            }
            executeConfirmationSeekingCommands(message.getId(), messageSentAtTime);

            var payload = messageCreatedEvent.getPayload();
            String senderId = payload.getMessage().getSenderId();
            if (availableBotUserIds.containsKey(senderId)) {
                //this message has been created by a bot user, likely us, therefore skip processing
                differPublisher.positiveDeliveryAck(deliveryTag);
                log.debug("Ignored message because created by us: {}", receivedMessage);
                return;
            }

            var conversationInfo = getConversationInfo(conversationId);
            if (conversationInfo == null) {
                log.warn("ConversationId {} is unknown in the system, yet it contains a know botUserId {}. " +
                        "Likely to eddi instances interfere each other here. " +
                        "This message.created event will be ignored due to lack of information.", conversationId, senderId);
                return;
            }
            if (isGroupChat(conversationInfo.getAllParticipantIds())) {
                List<MessageCreatedEvent.Mention> mentions = message.getMentions();
                if (mentions == null ||
                        mentions.stream().noneMatch(
                                mention -> availableBotUserIds.containsKey(mention.getUserId()))) {
                    //this message belongs to a conversation we are a part of, but since this
                    //is a group chat, we only process messages that contain a mentions of a bot user
                    differPublisher.positiveDeliveryAck(deliveryTag);
                    log.debug("Ignored message because it is a group chat: {}", receivedMessage);
                    return;
                }

                // this group chat has a mentions containing a botUserId
                // so we process this message
            }

            log.info(" [x] Received and accepted amqp event: '" + receivedMessage + "'");

            String userInput = payload.getMessage().getParts().get(0).getBody();
            conversationInfo.getBotParticipantIds().forEach(botUserId ->
                    processUserMessage(delivery, botUserId, conversationId,
                            userInput, messageCreatedEvent, getBotIntent(botUserId), Collections.emptyMap()));

        } catch (Exception e) {
            log.error("Error processing delivery {} of message.created.eddi with body {}", deliveryTag, receivedMessage);
            log.error(e.getLocalizedMessage(), e);
            differPublisher.negativeDeliveryAck(delivery);
        }
    };
}
 
Example #16
Source File: PoolableChannel.java    From jweb-cms with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, boolean autoAck, String consumerTag, boolean noLocal, boolean exclusive, Map<String, Object> arguments, DeliverCallback deliverCallback, CancelCallback cancelCallback, ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException {
    return delegate.basicConsume(queue, autoAck, consumerTag, noLocal, exclusive, arguments, deliverCallback, cancelCallback, shutdownSignalCallback);
}
 
Example #17
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, DeliverCallback deliverCallback, ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}
 
Example #18
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, DeliverCallback deliverCallback, CancelCallback cancelCallback, ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}
 
Example #19
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, boolean autoAck, DeliverCallback deliverCallback, CancelCallback cancelCallback) throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}
 
Example #20
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, boolean autoAck, DeliverCallback deliverCallback, ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}
 
Example #21
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, boolean autoAck, DeliverCallback deliverCallback, CancelCallback cancelCallback, ConsumerShutdownSignalCallback shutdownSignalCallback)
    throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}
 
Example #22
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, boolean autoAck, Map<String, Object> arguments, DeliverCallback deliverCallback, CancelCallback cancelCallback) throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}
 
Example #23
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, boolean autoAck, Map<String, Object> arguments, DeliverCallback deliverCallback, ConsumerShutdownSignalCallback shutdownSignalCallback)
    throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}
 
Example #24
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, boolean autoAck, Map<String, Object> arguments, DeliverCallback deliverCallback, CancelCallback cancelCallback,
    ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}
 
Example #25
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, boolean autoAck, String consumerTag, DeliverCallback deliverCallback, CancelCallback cancelCallback) throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}
 
Example #26
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, boolean autoAck, String consumerTag, DeliverCallback deliverCallback, ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}
 
Example #27
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, boolean autoAck, String consumerTag, DeliverCallback deliverCallback, CancelCallback cancelCallback, ConsumerShutdownSignalCallback shutdownSignalCallback)
    throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}
 
Example #28
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, boolean autoAck, String consumerTag, boolean noLocal, boolean exclusive, Map<String, Object> arguments, DeliverCallback deliverCallback,
    CancelCallback cancelCallback) throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}
 
Example #29
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, boolean autoAck, String consumerTag, boolean noLocal, boolean exclusive, Map<String, Object> arguments, DeliverCallback deliverCallback,
    ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}
 
Example #30
Source File: TestChannel.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public String basicConsume(String queue, boolean autoAck, String consumerTag, boolean noLocal, boolean exclusive, Map<String, Object> arguments, DeliverCallback deliverCallback,
    CancelCallback cancelCallback, ConsumerShutdownSignalCallback shutdownSignalCallback) throws IOException {
    throw new UnsupportedOperationException("This method is not currently supported as it is not used by current API in testing");
}